@pontive/server 1.26.0 → 1.27.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.
@@ -38,8 +38,8 @@ export interface AccessKeyWithSecret {
38
38
  updated_at?: string;
39
39
  }
40
40
  /**
41
- * AccessOutcomes decide what losing a contract or access leads to in the subject state. On a read both
42
- * are set; on an update only the fields given change.
41
+ * AccessOutcomes decide what losing a contract or access leads to in the Customer's access. On a read
42
+ * both are set; on an update only the fields given change.
43
43
  */
44
44
  export interface AccessOutcomes {
45
45
  /**
@@ -52,8 +52,8 @@ export interface AccessOutcomes {
52
52
  on_contract_ended: string;
53
53
  }
54
54
  /**
55
- * AccessOutcomes decide what losing a contract or access leads to in the subject state. On a read both
56
- * are set; on an update only the fields given change.
55
+ * AccessOutcomes decide what losing a contract or access leads to in the Customer's access. On a read
56
+ * both are set; on an update only the fields given change.
57
57
  */
58
58
  export interface AccessOutcomesInput {
59
59
  /**
@@ -1131,7 +1131,7 @@ export interface BillingScheduleInput {
1131
1131
  */
1132
1132
  export interface BillingSettings {
1133
1133
  /**
1134
- * What losing a contract or access leads to in the subject state.
1134
+ * What losing a contract or access leads to in the Customer's access.
1135
1135
  */
1136
1136
  access_outcomes: AccessOutcomes;
1137
1137
  default_collection: Collection;
@@ -3009,8 +3009,9 @@ export interface CreateSubscriptionRequest {
3009
3009
  headers?: Record<string, string>;
3010
3010
  metadata?: Record<string, string>;
3011
3011
  organization_id?: string;
3012
- scope?: "project" | "organization";
3012
+ scope?: "instance" | "organization" | "workspace";
3013
3013
  url: string;
3014
+ workspace_id?: string;
3014
3015
  }
3015
3016
  export interface CreateTimeMachineRequest {
3016
3017
  /**
@@ -3426,6 +3427,81 @@ export interface Customer {
3426
3427
  time_machine_id: string;
3427
3428
  updated_at: string;
3428
3429
  }
3430
+ /**
3431
+ * CustomerAccess is a Customer's access, part of the Customer: it has no id of its own.
3432
+ */
3433
+ export interface CustomerAccess {
3434
+ computed_at: string;
3435
+ /**
3436
+ * "cust_" plus 26 characters.
3437
+ */
3438
+ customer_id: string;
3439
+ /**
3440
+ * Every feature the subject resolves a value for, by key. A feature no source sets is absent: the
3441
+ * subject is not entitled to it.
3442
+ */
3443
+ features: Record<string, CustomerAccessFeature>;
3444
+ object: "customer_access";
3445
+ /**
3446
+ * The key of the package of the contract in force; unset with none.
3447
+ */
3448
+ package: string;
3449
+ /**
3450
+ * The seat cap; unset with none.
3451
+ */
3452
+ seat_limit: number;
3453
+ /**
3454
+ * The Customer's subject, since an enforcer works by subject.
3455
+ */
3456
+ subject: EntitlementSubject;
3457
+ suspended: boolean;
3458
+ /**
3459
+ * dunning, contract_ended, client_block or subject_deleted; unset when not suspended.
3460
+ */
3461
+ suspension_cause: string;
3462
+ /**
3463
+ * Increases on every change; 0 for a Customer with no access stored yet.
3464
+ */
3465
+ version: number;
3466
+ }
3467
+ /**
3468
+ * CustomerAccessFeature is one feature's value in an access, by its type. The gateway writes it as
3469
+ * billing.customer.access_changed carries it: { type, value } for a boolean (true or false) or a
3470
+ * numeric feature (a decimal string), and { type, allowance, per, limit, overage, exhausted } for a
3471
+ * metered one, the metered fields inline.
3472
+ */
3473
+ export interface CustomerAccessFeature {
3474
+ /**
3475
+ * A decimal.
3476
+ */
3477
+ allowance?: string;
3478
+ /**
3479
+ * True when the usage period's usage has reached the allowance: under a hard limit the next use is
3480
+ * denied. Recomputed, with a new version, when usage crosses the allowance either way.
3481
+ */
3482
+ exhausted?: boolean;
3483
+ /**
3484
+ * hard or soft.
3485
+ */
3486
+ limit?: string;
3487
+ /**
3488
+ * bill or block.
3489
+ */
3490
+ overage?: string;
3491
+ /**
3492
+ * period: the allowance is per usage period.
3493
+ */
3494
+ per?: string;
3495
+ /**
3496
+ * boolean, numeric or metered.
3497
+ */
3498
+ type: string;
3499
+ /**
3500
+ * A boolean or numeric feature's value; null for no limit. A metered feature carries its fields
3501
+ * instead.
3502
+ */
3503
+ value?: boolean | string;
3504
+ }
3429
3505
  export interface CustomerList {
3430
3506
  data: Customer[];
3431
3507
  object: "list";
@@ -3852,7 +3928,7 @@ export interface Edge {
3852
3928
  */
3853
3929
  export interface Edit {
3854
3930
  applied_at: string;
3855
- cancelled_at: string;
3931
+ canceled_at: string;
3856
3932
  contract_id: string;
3857
3933
  created_at: string;
3858
3934
  deleted_at: string;
@@ -3870,7 +3946,7 @@ export interface Edit {
3870
3946
  operations: Array<OperationSetQuantity | OperationAddSubscription | OperationEndSubscription | OperationAddOverride | OperationEndOverride | OperationChangePackage | OperationEndTrial | OperationAddBlock | OperationLiftBlock | OperationSetFeature | OperationUnsetFeature | OperationChangeBillingFrequency>;
3871
3947
  reason: string;
3872
3948
  /**
3873
- * scheduled, applied, deleted, dropped or cancelled.
3949
+ * scheduled, applied, deleted, dropped or canceled.
3874
3950
  */
3875
3951
  status: string;
3876
3952
  }
@@ -4079,6 +4155,10 @@ export interface Event {
4079
4155
  organization_id?: string;
4080
4156
  source?: "system" | "custom" | "meta" | "test";
4081
4157
  type?: string;
4158
+ /**
4159
+ * WorkspaceID is set on a workspace-level event, in the Platform Plane instance.
4160
+ */
4161
+ workspace_id?: string;
4082
4162
  }
4083
4163
  export interface EventCursorList {
4084
4164
  data: BillingEvent[];
@@ -4124,7 +4204,7 @@ export interface EventType {
4124
4204
  object?: string;
4125
4205
  payload_schema?: string;
4126
4206
  schema_mode?: "strict" | "lenient";
4127
- scope?: "project" | "organization";
4207
+ scope?: "instance" | "organization" | "workspace";
4128
4208
  type?: "system" | "custom";
4129
4209
  updated_at?: string;
4130
4210
  }
@@ -10111,82 +10191,6 @@ export interface StaffAccess {
10111
10191
  reason?: string;
10112
10192
  session_id?: string;
10113
10193
  }
10114
- /**
10115
- * SubjectState is one subject's state.
10116
- */
10117
- export interface SubjectState {
10118
- computed_at: string;
10119
- /**
10120
- * "cust_" plus 26 characters; unset when the subject has no Customer.
10121
- */
10122
- customer_id: string;
10123
- /**
10124
- * Every feature the subject resolves a value for, by key. A feature no source sets is absent: the
10125
- * subject is not entitled to it.
10126
- */
10127
- features: Record<string, SubjectStateFeature>;
10128
- /**
10129
- * "inst_" plus 26 characters.
10130
- */
10131
- instance_id: string;
10132
- object: "subject_state";
10133
- /**
10134
- * The key of the package of the contract in force; unset with none.
10135
- */
10136
- package: string;
10137
- /**
10138
- * The seat cap; unset with none.
10139
- */
10140
- seat_limit: number;
10141
- subject: EntitlementSubject;
10142
- suspended: boolean;
10143
- /**
10144
- * dunning, contract_ended, client_block or subject_deleted; unset when not suspended.
10145
- */
10146
- suspension_cause: string;
10147
- /**
10148
- * Increases on every change; 0 for a subject with no state stored.
10149
- */
10150
- version: number;
10151
- }
10152
- /**
10153
- * SubjectStateFeature is one feature's value in a state, by its type. The gateway writes it as
10154
- * billing.subject_state.changed carries it: { type, value } for a boolean (true or false) or a numeric
10155
- * feature (a decimal string), and { type, allowance, per, limit, overage, exhausted } for a metered
10156
- * one, the metered fields inline.
10157
- */
10158
- export interface SubjectStateFeature {
10159
- /**
10160
- * A decimal.
10161
- */
10162
- allowance?: string;
10163
- /**
10164
- * True when the usage period's usage has reached the allowance: under a hard limit the next use is
10165
- * denied. Recomputed, with a new version, when usage crosses the allowance either way.
10166
- */
10167
- exhausted?: boolean;
10168
- /**
10169
- * hard or soft.
10170
- */
10171
- limit?: string;
10172
- /**
10173
- * bill or block.
10174
- */
10175
- overage?: string;
10176
- /**
10177
- * period: the allowance is per usage period.
10178
- */
10179
- per?: string;
10180
- /**
10181
- * boolean, numeric or metered.
10182
- */
10183
- type: string;
10184
- /**
10185
- * A boolean or numeric feature's value; null for no limit. A metered feature carries its fields
10186
- * instead.
10187
- */
10188
- value?: boolean | string;
10189
- }
10190
10194
  export interface Subscription {
10191
10195
  allow_private_ips?: boolean;
10192
10196
  created_at?: string;
@@ -10199,7 +10203,7 @@ export interface Subscription {
10199
10203
  metadata?: Record<string, string>;
10200
10204
  object?: string;
10201
10205
  organization_id?: string;
10202
- scope?: "project" | "organization";
10206
+ scope?: "instance" | "organization" | "workspace";
10203
10207
  /**
10204
10208
  * Secret is the plaintext Standard Webhooks signing secret ("whsec_…"). Present only in
10205
10209
  * create/rotate-secret responses; never readable again.
@@ -10210,6 +10214,11 @@ export interface Subscription {
10210
10214
  status?: "active" | "paused" | "failing" | "disabled";
10211
10215
  updated_at?: string;
10212
10216
  url?: string;
10217
+ /**
10218
+ * WorkspaceID is the workspace a workspace-scope subscription is bound to, in the Platform Plane
10219
+ * instance (pontive-spec 11, Webhook levels).
10220
+ */
10221
+ workspace_id?: string;
10213
10222
  }
10214
10223
  /**
10215
10224
  * SubscriptionInput is a subscription as a client sends it, at creation or in add_subscription.
@@ -13043,19 +13052,6 @@ export interface UpdateBillingSettingsParams {
13043
13052
  */
13044
13053
  if_match?: string;
13045
13054
  }
13046
- /**
13047
- * The parameters of `GetSubjectState`.
13048
- */
13049
- export interface GetSubjectStateParams {
13050
- /**
13051
- * user, organization or external
13052
- */
13053
- subject_type: string;
13054
- /**
13055
- * A user's or organization's id, or the client's own external id
13056
- */
13057
- subject_id: string;
13058
- }
13059
13055
  /**
13060
13056
  * The parameters of `ListTimeMachines`.
13061
13057
  */
@@ -14754,7 +14750,7 @@ export interface ListWebhookEventTypesParams {
14754
14750
  */
14755
14751
  type?: string;
14756
14752
  /**
14757
- * Filter by scope (project|organization)
14753
+ * Filter by scope (instance|organization|workspace)
14758
14754
  */
14759
14755
  scope?: string;
14760
14756
  /**
@@ -14782,6 +14778,10 @@ export interface ListWebhookEventsParams {
14782
14778
  * Filter by organization (org_…)
14783
14779
  */
14784
14780
  organization_id?: string;
14781
+ /**
14782
+ * Filter by workspace (ws_…): a workspace-level event, in the Platform Plane instance
14783
+ */
14784
+ workspace_id?: string;
14785
14785
  /**
14786
14786
  * RFC 3339: created at or after
14787
14787
  */
@@ -14808,7 +14808,7 @@ export interface ListWebhookEventsParams {
14808
14808
  */
14809
14809
  export interface ListWebhookSubscriptionsParams {
14810
14810
  /**
14811
- * Filter by scope (project|organization)
14811
+ * Filter by scope (instance|organization|workspace)
14812
14812
  */
14813
14813
  scope?: string;
14814
14814
  /**
@@ -14819,6 +14819,10 @@ export interface ListWebhookSubscriptionsParams {
14819
14819
  * Filter organization-scope subscriptions by organization (org_…)
14820
14820
  */
14821
14821
  organization_id?: string;
14822
+ /**
14823
+ * Filter workspace-scope subscriptions by workspace (ws_…)
14824
+ */
14825
+ workspace_id?: string;
14822
14826
  /**
14823
14827
  * Sort field; prefix with - for descending. Allowed: created_at, updated_at, status, url. Default:
14824
14828
  * -created_at
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./client-fmMA2Var.cjs");exports.APIPromise=r.APIPromise;exports.AuthenticationError=r.AuthenticationError;exports.BadRequestError=r.BadRequestError;exports.ConflictError=r.ConflictError;exports.InternalServerError=r.InternalServerError;exports.NotFoundError=r.NotFoundError;exports.Page=r.Page;exports.PagePromise=r.PagePromise;exports.PermissionDeniedError=r.PermissionDeniedError;exports.Pontive=r.Pontive;exports.PontiveAPIError=r.PontiveAPIError;exports.PontiveConnectionError=r.PontiveConnectionError;exports.PreconditionFailedError=r.PreconditionFailedError;exports.RateLimitError=r.RateLimitError;exports.UnprocessableEntityError=r.UnprocessableEntityError;exports.secretKeyRegion=r.secretKeyRegion;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./client-DdtDcUK9.cjs");exports.APIPromise=r.APIPromise;exports.AuthenticationError=r.AuthenticationError;exports.BadRequestError=r.BadRequestError;exports.ConflictError=r.ConflictError;exports.InternalServerError=r.InternalServerError;exports.NotFoundError=r.NotFoundError;exports.Page=r.Page;exports.PagePromise=r.PagePromise;exports.PermissionDeniedError=r.PermissionDeniedError;exports.Pontive=r.Pontive;exports.PontiveAPIError=r.PontiveAPIError;exports.PontiveConnectionError=r.PontiveConnectionError;exports.PreconditionFailedError=r.PreconditionFailedError;exports.RateLimitError=r.RateLimitError;exports.UnprocessableEntityError=r.UnprocessableEntityError;exports.secretKeyRegion=r.secretKeyRegion;
2
2
  //# sourceMappingURL=management.cjs.map
@@ -1,4 +1,4 @@
1
- import { A as e, a, B as s, C as i, I as n, N as t, P as E, b as P, c, d, e as m, f as g, g as l, R as v, U as A, s as I } from "./client-BI4W1IJJ.js";
1
+ import { A as e, a, B as s, C as i, I as n, N as t, P as E, b as P, c, d, e as m, f as g, g as l, R as v, U as A, s as I } from "./client-B3NStbMW.js";
2
2
  export {
3
3
  e as APIPromise,
4
4
  a as AuthenticationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pontive/server",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "license": "MIT",
5
5
  "description": "The Pontive SDK for TypeScript servers: the management API client, sessions for apps (sign-in, a sealed session cookie, safe token refresh) and resource-server middleware for APIs and MCP servers, on Web Request/Response.",
6
6
  "type": "module",