@pontive/server 1.25.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.
- package/dist/{client-DWO-uz9e.js → client-B3NStbMW.js} +105 -107
- package/dist/client-B3NStbMW.js.map +1 -0
- package/dist/client-DdtDcUK9.cjs +2 -0
- package/dist/client-DdtDcUK9.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/management/generated/namespaces.d.cts +27 -30
- package/dist/management/generated/namespaces.d.ts +27 -30
- package/dist/management/generated/types.d.cts +130 -103
- package/dist/management/generated/types.d.ts +130 -103
- package/dist/management.cjs +1 -1
- package/dist/management.js +1 -1
- package/package.json +1 -1
- package/dist/client-D80_tH4S.cjs +0 -2
- package/dist/client-D80_tH4S.cjs.map +0 -1
- package/dist/client-DWO-uz9e.js.map +0 -1
|
@@ -11,30 +11,30 @@ const $ = {
|
|
|
11
11
|
region: "PONTIVE_REGION",
|
|
12
12
|
keyless: "PONTIVE_KEYLESS"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function b() {
|
|
15
15
|
try {
|
|
16
16
|
return globalThis.process?.env ?? {};
|
|
17
17
|
} catch {
|
|
18
18
|
return {};
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
21
|
+
const y = (i) => i && i.trim() ? i.trim() : void 0;
|
|
22
|
+
function bt(i, e = b()) {
|
|
23
23
|
return {
|
|
24
24
|
...i,
|
|
25
|
-
issuer: i.issuer ||
|
|
26
|
-
clientId: i.clientId ||
|
|
27
|
-
clientSecret: i.clientSecret ||
|
|
28
|
-
sessionSecret: i.sessionSecret ||
|
|
25
|
+
issuer: i.issuer || y(e[$.issuer]),
|
|
26
|
+
clientId: i.clientId || y(e[$.clientId]),
|
|
27
|
+
clientSecret: i.clientSecret || y(e[$.clientSecret]),
|
|
28
|
+
sessionSecret: i.sessionSecret || y(e[$.sessionSecret])
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function M(i =
|
|
31
|
+
function M(i = b()) {
|
|
32
32
|
return i.NODE_ENV === "development";
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function Pt(i, e = b()) {
|
|
35
35
|
return M(e) && !i.issuer && e[$.keyless]?.trim() !== "0";
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class c extends Error {
|
|
38
38
|
/** The HTTP status. */
|
|
39
39
|
status;
|
|
40
40
|
/** The category: validation_error, authentication_error, authorization_error, not_found, conflict_error, rate_limit_error or internal_error. */
|
|
@@ -59,27 +59,27 @@ class u extends Error {
|
|
|
59
59
|
}
|
|
60
60
|
/** The error for a status: its subclass where it has one. */
|
|
61
61
|
static from(e, t, r) {
|
|
62
|
-
const o = F[e] ?? (e >= 500 ? K :
|
|
62
|
+
const o = F[e] ?? (e >= 500 ? K : c);
|
|
63
63
|
return new o(e, t, r);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
class _ extends
|
|
66
|
+
class _ extends c {
|
|
67
67
|
}
|
|
68
|
-
class R extends
|
|
68
|
+
class R extends c {
|
|
69
69
|
}
|
|
70
|
-
class x extends
|
|
70
|
+
class x extends c {
|
|
71
71
|
}
|
|
72
|
-
class N extends
|
|
72
|
+
class N extends c {
|
|
73
73
|
}
|
|
74
|
-
class U extends
|
|
74
|
+
class U extends c {
|
|
75
75
|
}
|
|
76
|
-
class H extends
|
|
76
|
+
class H extends c {
|
|
77
77
|
}
|
|
78
|
-
class B extends
|
|
78
|
+
class B extends c {
|
|
79
79
|
}
|
|
80
|
-
class V extends
|
|
80
|
+
class V extends c {
|
|
81
81
|
}
|
|
82
|
-
class K extends
|
|
82
|
+
class K extends c {
|
|
83
83
|
}
|
|
84
84
|
const F = {
|
|
85
85
|
400: _,
|
|
@@ -96,7 +96,7 @@ class A extends Error {
|
|
|
96
96
|
super(e, t), this.name = "PontiveConnectionError";
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
const j = "1.
|
|
99
|
+
const j = "1.27.0", S = 6e4;
|
|
100
100
|
class W {
|
|
101
101
|
constructor(e) {
|
|
102
102
|
this.config = e;
|
|
@@ -118,17 +118,17 @@ class W {
|
|
|
118
118
|
throw new Error(
|
|
119
119
|
e.host === "auth" ? "pontive: pontive.me is served on the instance's auth domain: pass issuer or set PONTIVE_ISSUER" : "pontive: no region: pass region or managementUrl"
|
|
120
120
|
);
|
|
121
|
-
const m = n + e.path + Y(e.query), l = e.body === void 0 ? void 0 : JSON.stringify(e.body), v = r.sleep ?? ((d) => new Promise((
|
|
121
|
+
const m = n + e.path + Y(e.query), l = e.body === void 0 ? void 0 : JSON.stringify(e.body), v = r.sleep ?? ((d) => new Promise((u) => setTimeout(u, d)));
|
|
122
122
|
let T = !1;
|
|
123
123
|
for (let d = 0; ; d++) {
|
|
124
|
-
const
|
|
125
|
-
for (const [g, q] of Object.entries(e.headers ?? {})) q !== void 0 && q !== "" &&
|
|
126
|
-
for (const [g, q] of Object.entries(t.headers ?? {}))
|
|
127
|
-
|
|
124
|
+
const u = new Headers();
|
|
125
|
+
for (const [g, q] of Object.entries(e.headers ?? {})) q !== void 0 && q !== "" && u.set(g, q);
|
|
126
|
+
for (const [g, q] of Object.entries(t.headers ?? {})) u.set(g, q);
|
|
127
|
+
u.set("authorization", `Bearer ${await r.token()}`), u.set("accept", e.binary ? "*/*" : "application/json"), u.set("user-agent", `pontive-typescript/${j}`), l !== void 0 && u.set("content-type", "application/json"), a && u.set("x-idempotency-key", a), r.instanceId && u.set("x-pontive-instance-id", r.instanceId);
|
|
128
128
|
const P = AbortSignal.timeout(t.timeout ?? r.timeout), k = t.signal ? AbortSignal.any([t.signal, P]) : P;
|
|
129
129
|
let p;
|
|
130
130
|
try {
|
|
131
|
-
p = await r.fetch(m, { method: e.method, headers:
|
|
131
|
+
p = await r.fetch(m, { method: e.method, headers: u, body: l, signal: k });
|
|
132
132
|
} catch (g) {
|
|
133
133
|
if (t.signal?.aborted || !h || d >= o)
|
|
134
134
|
throw new A(`pontive: ${e.method} ${e.path}: ${g.message}`, { cause: g });
|
|
@@ -145,7 +145,7 @@ class W {
|
|
|
145
145
|
await v(O(d, p.headers));
|
|
146
146
|
continue;
|
|
147
147
|
}
|
|
148
|
-
throw
|
|
148
|
+
throw c.from(p.status, p.headers, I);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -273,7 +273,7 @@ const s = encodeURIComponent;
|
|
|
273
273
|
class te {
|
|
274
274
|
/** @internal */
|
|
275
275
|
constructor(e) {
|
|
276
|
-
this.core = e, this.accessKeys = new re(e), this.agents = new se(e), this.apis = new ie(e), this.apps = new oe(e), this.authn = new ae(e), this.authz = new ge(e), this.billing = new $e(e), this.branding = new
|
|
276
|
+
this.core = e, this.accessKeys = new re(e), this.agents = new se(e), this.apis = new ie(e), this.apps = new oe(e), this.authn = new ae(e), this.authz = new ge(e), this.billing = new $e(e), this.branding = new Xe(e), this.capabilities = new et(e), this.countries = new st(e), this.delegations = new it(e), this.groups = new ot(e), this.logs = new at(e), this.me = new ht(e), this.organizations = new ct(e), this.personalAccessTokens = new ut(e), this.resources = new pt(e), this.root = new lt(e), this.serviceAccounts = new dt(e), this.userImports = new mt(e), this.users = new gt(e), this.webhooks = new vt(e);
|
|
277
277
|
}
|
|
278
278
|
core;
|
|
279
279
|
/**
|
|
@@ -1100,7 +1100,7 @@ class oe {
|
|
|
1100
1100
|
class ae {
|
|
1101
1101
|
/** @internal */
|
|
1102
1102
|
constructor(e) {
|
|
1103
|
-
this.core = e, this.accountLinking = new he(e), this.authflows = new ne(e), this.connections = new
|
|
1103
|
+
this.core = e, this.accountLinking = new he(e), this.authflows = new ne(e), this.connections = new ce(e), this.identityPolicy = new ue(e), this.migrationSources = new pe(e), this.passwordPolicy = new le(e), this.sharedCredentials = new de(e), this.trustedIssuers = new me(e);
|
|
1104
1104
|
}
|
|
1105
1105
|
core;
|
|
1106
1106
|
/**
|
|
@@ -1237,7 +1237,7 @@ class ne {
|
|
|
1237
1237
|
return this.core.request({ host: "api", method: "POST", path: "/v1/authn/authflows/document/import", headers: { "If-Match": o }, body: e, idempotent: !0 }, r);
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
class
|
|
1240
|
+
class ce {
|
|
1241
1241
|
/** @internal */
|
|
1242
1242
|
constructor(e) {
|
|
1243
1243
|
this.core = e;
|
|
@@ -1306,7 +1306,7 @@ class ue {
|
|
|
1306
1306
|
return this.core.request({ host: "api", method: "PUT", path: `/v1/apps/${s(e)}/auth-connections/${s(t)}`, body: r }, o);
|
|
1307
1307
|
}
|
|
1308
1308
|
}
|
|
1309
|
-
class
|
|
1309
|
+
class ue {
|
|
1310
1310
|
/** @internal */
|
|
1311
1311
|
constructor(e) {
|
|
1312
1312
|
this.core = e;
|
|
@@ -2031,7 +2031,7 @@ class Ee {
|
|
|
2031
2031
|
class $e {
|
|
2032
2032
|
/** @internal */
|
|
2033
2033
|
constructor(e) {
|
|
2034
|
-
this.core = e, this.catalog = new
|
|
2034
|
+
this.core = e, this.catalog = new ye(e), this.catalogRules = new be(e), this.checkoutSessions = new Pe(e), this.contracts = new Se(e), this.creditNotes = new Oe(e), this.currencies = new Ge(e), this.customers = new fe(e), this.disputes = new we(e), this.dunning = new Ae(e), this.entitlements = new Ce(e), this.eventTypes = new ke(e), this.events = new Ie(e), this.exchangeRates = new ze(e), this.features = new Le(e), this.grants = new De(e), this.invoices = new Me(e), this.ledger = new _e(e), this.meters = new Re(e), this.packages = new xe(e), this.paymentConnections = new Ne(e), this.paymentMethods = new Ue(e), this.payments = new He(e), this.pricingUnits = new Be(e), this.products = new Ve(e), this.rateCards = new Ke(e), this.refunds = new Fe(e), this.settings = new je(e), this.tax = new We(e), this.timeMachines = new Ye(e), this.usage = new Je(e);
|
|
2035
2035
|
}
|
|
2036
2036
|
core;
|
|
2037
2037
|
catalog;
|
|
@@ -2061,12 +2061,11 @@ class $e {
|
|
|
2061
2061
|
rateCards;
|
|
2062
2062
|
refunds;
|
|
2063
2063
|
settings;
|
|
2064
|
-
subjectStates;
|
|
2065
2064
|
tax;
|
|
2066
2065
|
timeMachines;
|
|
2067
2066
|
usage;
|
|
2068
2067
|
}
|
|
2069
|
-
class
|
|
2068
|
+
class ye {
|
|
2070
2069
|
/** @internal */
|
|
2071
2070
|
constructor(e) {
|
|
2072
2071
|
this.core = e;
|
|
@@ -2102,7 +2101,7 @@ class be {
|
|
|
2102
2101
|
return this.core.request({ host: "api", method: "POST", path: "/v1/billing/catalog/import", body: e, idempotent: !0 }, t);
|
|
2103
2102
|
}
|
|
2104
2103
|
}
|
|
2105
|
-
class
|
|
2104
|
+
class be {
|
|
2106
2105
|
/** @internal */
|
|
2107
2106
|
constructor(e) {
|
|
2108
2107
|
this.core = e;
|
|
@@ -2350,12 +2349,14 @@ class Ge {
|
|
|
2350
2349
|
* billing.catalog.v1.CurrencyService/ListCurrencies (32-billing-overview.md, API Surface, Currencies).
|
|
2351
2350
|
* Every currency billing accepts, sorted by code: its upper-case ISO 4217 code, English name, minor
|
|
2352
2351
|
* units (exponent), whether Stripe can charge it (chargeable) and Stripe's minimum charge, or null.
|
|
2353
|
-
* chargeable=true lists only the chargeable ones.
|
|
2352
|
+
* chargeable=true lists only the chargeable ones. Paged like every list.
|
|
2354
2353
|
*
|
|
2355
2354
|
* `GET /v1/billing/currencies` (ListCurrencies)
|
|
2355
|
+
*
|
|
2356
|
+
* Await it for the first page, or iterate it with `for await` for every item across pages.
|
|
2356
2357
|
*/
|
|
2357
2358
|
list(e, t) {
|
|
2358
|
-
return this.core.
|
|
2359
|
+
return this.core.page("page", { host: "api", method: "GET", path: "/v1/billing/currencies", query: e }, t);
|
|
2359
2360
|
}
|
|
2360
2361
|
}
|
|
2361
2362
|
class fe {
|
|
@@ -2414,6 +2415,24 @@ class fe {
|
|
|
2414
2415
|
get(e, t) {
|
|
2415
2416
|
return this.core.request({ host: "api", method: "GET", path: `/v1/billing/customers/${s(e)}` }, t);
|
|
2416
2417
|
}
|
|
2418
|
+
/**
|
|
2419
|
+
* billing.entitlement.v1.CustomerAccessService/GetCustomerAccess (32-billing-overview.md, API Surface,
|
|
2420
|
+
* Customer access; Data Model, Customer access; billing-svc docs/questions.md, P125). The Customer's
|
|
2421
|
+
* current access: its subject, the package it is on, every feature it resolves a value for by key ({
|
|
2422
|
+
* type, value } for a boolean or numeric feature, { type, allowance, per, limit, overage, exhausted }
|
|
2423
|
+
* for a metered one; billing-svc docs/questions.md, P107), seat_limit, suspended and suspension_cause,
|
|
2424
|
+
* with a version that increases on every change. A Customer with no access stored yet answers the
|
|
2425
|
+
* access computed now with version 0. A client that knows only a subject finds its Customer with GET
|
|
2426
|
+
* /v1/billing/customers?subject_type=&subject_id=; a subject with no Customer has no access, only the
|
|
2427
|
+
* defaults. Needs sys:billing:read on the root, and answers while billing is off (billing-svc
|
|
2428
|
+
* docs/questions.md, P41). An unknown Customer is customer_not_found. The RPC writes nothing, so
|
|
2429
|
+
* X-Idempotency-Key is not read.
|
|
2430
|
+
*
|
|
2431
|
+
* `GET /v1/billing/customers/{customer_id}/access` (GetCustomerAccess)
|
|
2432
|
+
*/
|
|
2433
|
+
getAccess(e, t) {
|
|
2434
|
+
return this.core.request({ host: "api", method: "GET", path: `/v1/billing/customers/${s(e)}/access` }, t);
|
|
2435
|
+
}
|
|
2417
2436
|
/**
|
|
2418
2437
|
* billing.customer.v1.CustomerService/ListCustomers (32-billing-overview.md, API Surface).
|
|
2419
2438
|
*
|
|
@@ -3606,30 +3625,6 @@ class je {
|
|
|
3606
3625
|
}
|
|
3607
3626
|
}
|
|
3608
3627
|
class We {
|
|
3609
|
-
/** @internal */
|
|
3610
|
-
constructor(e) {
|
|
3611
|
-
this.core = e;
|
|
3612
|
-
}
|
|
3613
|
-
core;
|
|
3614
|
-
/**
|
|
3615
|
-
* billing.entitlement.v1.SubjectStateService/GetSubjectState (32-billing-overview.md, API Surface,
|
|
3616
|
-
* Subject states; Data Model, Subject state). The subject's current state: its package, every feature
|
|
3617
|
-
* it resolves a value for by key ({ type, value } for a boolean or numeric feature, { type, allowance,
|
|
3618
|
-
* per, limit, overage, exhausted } for a metered one; billing-svc docs/questions.md, P107),
|
|
3619
|
-
* seat_limit, suspended and suspension_cause, with a version that increases on every change. A subject
|
|
3620
|
-
* with no state yet answers the defaults with version 0: customer_id, package and seat_limit null, the
|
|
3621
|
-
* values of default_features as features (a metered default not exhausted), suspended false. Needs
|
|
3622
|
-
* sys:billing:read on the root, and answers while billing is off (billing-svc docs/questions.md, P41).
|
|
3623
|
-
* An unknown subject_type is invalid_subject_type; a user or organization not in the instance is
|
|
3624
|
-
* subject_not_found. The RPC writes nothing, so X-Idempotency-Key is not read.
|
|
3625
|
-
*
|
|
3626
|
-
* `GET /v1/billing/subject-state` (GetSubjectState)
|
|
3627
|
-
*/
|
|
3628
|
-
get(e, t) {
|
|
3629
|
-
return this.core.request({ host: "api", method: "GET", path: "/v1/billing/subject-state", query: e }, t);
|
|
3630
|
-
}
|
|
3631
|
-
}
|
|
3632
|
-
class Ye {
|
|
3633
3628
|
/** @internal */
|
|
3634
3629
|
constructor(e) {
|
|
3635
3630
|
this.core = e;
|
|
@@ -3648,7 +3643,7 @@ class Ye {
|
|
|
3648
3643
|
return this.core.request({ host: "api", method: "POST", path: "/v1/billing/tax/preview", body: e }, t);
|
|
3649
3644
|
}
|
|
3650
3645
|
}
|
|
3651
|
-
class
|
|
3646
|
+
class Ye {
|
|
3652
3647
|
/** @internal */
|
|
3653
3648
|
constructor(e) {
|
|
3654
3649
|
this.core = e;
|
|
@@ -3706,7 +3701,7 @@ class Je {
|
|
|
3706
3701
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/billing/time-machines", query: e }, t);
|
|
3707
3702
|
}
|
|
3708
3703
|
}
|
|
3709
|
-
class
|
|
3704
|
+
class Je {
|
|
3710
3705
|
/** @internal */
|
|
3711
3706
|
constructor(e) {
|
|
3712
3707
|
this.core = e;
|
|
@@ -3771,10 +3766,10 @@ class Xe {
|
|
|
3771
3766
|
return this.core.request({ host: "ingest", method: "POST", path: "/v1/usage/events/void", body: e, idempotent: !0 }, t);
|
|
3772
3767
|
}
|
|
3773
3768
|
}
|
|
3774
|
-
class
|
|
3769
|
+
class Xe {
|
|
3775
3770
|
/** @internal */
|
|
3776
3771
|
constructor(e) {
|
|
3777
|
-
this.core = e, this.blueprints = new
|
|
3772
|
+
this.core = e, this.blueprints = new Qe(e), this.localization = new Ze(e);
|
|
3778
3773
|
}
|
|
3779
3774
|
core;
|
|
3780
3775
|
blueprints;
|
|
@@ -3836,7 +3831,7 @@ class Qe {
|
|
|
3836
3831
|
return this.core.request({ host: "api", method: "POST", path: "/v1/branding/document/import", headers: { "If-Match": o }, body: e, idempotent: !0 }, r);
|
|
3837
3832
|
}
|
|
3838
3833
|
}
|
|
3839
|
-
class
|
|
3834
|
+
class Qe {
|
|
3840
3835
|
/** @internal */
|
|
3841
3836
|
constructor(e) {
|
|
3842
3837
|
this.core = e;
|
|
@@ -3854,7 +3849,7 @@ class Ze {
|
|
|
3854
3849
|
return this.core.request({ host: "api", method: "DELETE", path: `/v1/branding/blueprints/${s(e)}` }, t);
|
|
3855
3850
|
}
|
|
3856
3851
|
}
|
|
3857
|
-
class
|
|
3852
|
+
class Ze {
|
|
3858
3853
|
/** @internal */
|
|
3859
3854
|
constructor(e) {
|
|
3860
3855
|
this.core = e;
|
|
@@ -3885,16 +3880,16 @@ class et {
|
|
|
3885
3880
|
return this.core.request({ host: "api", method: "PATCH", path: "/v1/branding/localization", headers: { "If-Match": o }, body: e }, r);
|
|
3886
3881
|
}
|
|
3887
3882
|
}
|
|
3888
|
-
class
|
|
3883
|
+
class et {
|
|
3889
3884
|
/** @internal */
|
|
3890
3885
|
constructor(e) {
|
|
3891
|
-
this.core = e, this.billing = new
|
|
3886
|
+
this.core = e, this.billing = new tt(e), this.fga = new rt(e);
|
|
3892
3887
|
}
|
|
3893
3888
|
core;
|
|
3894
3889
|
billing;
|
|
3895
3890
|
fga;
|
|
3896
3891
|
}
|
|
3897
|
-
class
|
|
3892
|
+
class tt {
|
|
3898
3893
|
/** @internal */
|
|
3899
3894
|
constructor(e) {
|
|
3900
3895
|
this.core = e;
|
|
@@ -3921,7 +3916,7 @@ class rt {
|
|
|
3921
3916
|
return this.core.request({ host: "api", method: "POST", path: "/v1/capabilities/billing/enable", idempotent: !0 }, e);
|
|
3922
3917
|
}
|
|
3923
3918
|
}
|
|
3924
|
-
class
|
|
3919
|
+
class rt {
|
|
3925
3920
|
/** @internal */
|
|
3926
3921
|
constructor(e) {
|
|
3927
3922
|
this.core = e;
|
|
@@ -3950,7 +3945,7 @@ class st {
|
|
|
3950
3945
|
return this.core.request({ host: "api", method: "POST", path: "/v1/capabilities/fga/enable" }, e);
|
|
3951
3946
|
}
|
|
3952
3947
|
}
|
|
3953
|
-
class
|
|
3948
|
+
class st {
|
|
3954
3949
|
/** @internal */
|
|
3955
3950
|
constructor(e) {
|
|
3956
3951
|
this.core = e;
|
|
@@ -3973,7 +3968,7 @@ class it {
|
|
|
3973
3968
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/countries", query: e }, t);
|
|
3974
3969
|
}
|
|
3975
3970
|
}
|
|
3976
|
-
class
|
|
3971
|
+
class it {
|
|
3977
3972
|
/** @internal */
|
|
3978
3973
|
constructor(e) {
|
|
3979
3974
|
this.core = e;
|
|
@@ -4031,7 +4026,7 @@ class ot {
|
|
|
4031
4026
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/delegations", query: e }, t);
|
|
4032
4027
|
}
|
|
4033
4028
|
}
|
|
4034
|
-
class
|
|
4029
|
+
class ot {
|
|
4035
4030
|
/** @internal */
|
|
4036
4031
|
constructor(e) {
|
|
4037
4032
|
this.core = e;
|
|
@@ -4145,7 +4140,7 @@ class at {
|
|
|
4145
4140
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/groups/${s(e)}`, body: t }, r);
|
|
4146
4141
|
}
|
|
4147
4142
|
}
|
|
4148
|
-
class
|
|
4143
|
+
class at {
|
|
4149
4144
|
/** @internal */
|
|
4150
4145
|
constructor(e) {
|
|
4151
4146
|
this.core = e;
|
|
@@ -4199,10 +4194,10 @@ class ht {
|
|
|
4199
4194
|
return this.core.page("cursor", { host: "api", method: "GET", path: "/v1/logs/requests", query: e }, t);
|
|
4200
4195
|
}
|
|
4201
4196
|
}
|
|
4202
|
-
class
|
|
4197
|
+
class ht {
|
|
4203
4198
|
/** @internal */
|
|
4204
4199
|
constructor(e) {
|
|
4205
|
-
this.core = e, this.billing = new
|
|
4200
|
+
this.core = e, this.billing = new nt(e);
|
|
4206
4201
|
}
|
|
4207
4202
|
core;
|
|
4208
4203
|
billing;
|
|
@@ -4305,7 +4300,7 @@ class nt {
|
|
|
4305
4300
|
return this.core.request({ host: "auth", method: "PATCH", path: "/v1/me", body: e }, t);
|
|
4306
4301
|
}
|
|
4307
4302
|
}
|
|
4308
|
-
class
|
|
4303
|
+
class nt {
|
|
4309
4304
|
/** @internal */
|
|
4310
4305
|
constructor(e) {
|
|
4311
4306
|
this.core = e;
|
|
@@ -4387,7 +4382,7 @@ class ut {
|
|
|
4387
4382
|
* End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled
|
|
4388
4383
|
* downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other
|
|
4389
4384
|
* edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer,
|
|
4390
|
-
* may be cancelled here; one the client made is change_not_allowed. billing.contract.
|
|
4385
|
+
* may be cancelled here; one the client made is change_not_allowed. billing.contract.edit_canceled is
|
|
4391
4386
|
* written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token
|
|
4392
4387
|
* must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay
|
|
4393
4388
|
* (D31, D48).
|
|
@@ -4527,9 +4522,11 @@ class ut {
|
|
|
4527
4522
|
* audience, https://{auth domain}/me/, with pontive:billing:read (D31, D48).
|
|
4528
4523
|
*
|
|
4529
4524
|
* `GET /v1/me/billing/customers` (ListMyCustomers)
|
|
4525
|
+
*
|
|
4526
|
+
* Await it for the first page, or iterate it with `for await` for every item across pages.
|
|
4530
4527
|
*/
|
|
4531
|
-
listCustomers(e) {
|
|
4532
|
-
return this.core.
|
|
4528
|
+
listCustomers(e, t) {
|
|
4529
|
+
return this.core.page("page", { host: "auth", method: "GET", path: "/v1/me/billing/customers", query: e }, t);
|
|
4533
4530
|
}
|
|
4534
4531
|
/**
|
|
4535
4532
|
* billing.invoice.v1.MeInvoiceService/ListMyInvoices (37-invoicing.md, API Surface). An instance
|
|
@@ -5253,7 +5250,7 @@ class ct {
|
|
|
5253
5250
|
return this.core.request({ host: "api", method: "PATCH", path: "/v1/organizations/settings", headers: { "If-Match": o }, body: e }, r);
|
|
5254
5251
|
}
|
|
5255
5252
|
}
|
|
5256
|
-
class
|
|
5253
|
+
class ut {
|
|
5257
5254
|
/** @internal */
|
|
5258
5255
|
constructor(e) {
|
|
5259
5256
|
this.core = e;
|
|
@@ -5313,7 +5310,7 @@ class pt {
|
|
|
5313
5310
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/personal-access-tokens/${s(e)}`, body: t }, r);
|
|
5314
5311
|
}
|
|
5315
5312
|
}
|
|
5316
|
-
class
|
|
5313
|
+
class pt {
|
|
5317
5314
|
/** @internal */
|
|
5318
5315
|
constructor(e) {
|
|
5319
5316
|
this.core = e;
|
|
@@ -5580,7 +5577,7 @@ class lt {
|
|
|
5580
5577
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/resources/${s(e)}/members/${s(t)}`, body: r }, o);
|
|
5581
5578
|
}
|
|
5582
5579
|
}
|
|
5583
|
-
class
|
|
5580
|
+
class lt {
|
|
5584
5581
|
/** @internal */
|
|
5585
5582
|
constructor(e) {
|
|
5586
5583
|
this.core = e;
|
|
@@ -5819,7 +5816,7 @@ class dt {
|
|
|
5819
5816
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/root/members/${s(e)}`, body: t }, r);
|
|
5820
5817
|
}
|
|
5821
5818
|
}
|
|
5822
|
-
class
|
|
5819
|
+
class dt {
|
|
5823
5820
|
/** @internal */
|
|
5824
5821
|
constructor(e) {
|
|
5825
5822
|
this.core = e;
|
|
@@ -6095,7 +6092,7 @@ class mt {
|
|
|
6095
6092
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/service-accounts/${s(e)}/token-config`, headers: { "If-Match": a }, body: t }, o);
|
|
6096
6093
|
}
|
|
6097
6094
|
}
|
|
6098
|
-
class
|
|
6095
|
+
class mt {
|
|
6099
6096
|
/** @internal */
|
|
6100
6097
|
constructor(e) {
|
|
6101
6098
|
this.core = e;
|
|
@@ -6174,7 +6171,7 @@ class gt {
|
|
|
6174
6171
|
return this.core.request({ host: "api", method: "POST", path: `/v1/user-imports/${s(e)}/revert`, body: t }, r);
|
|
6175
6172
|
}
|
|
6176
6173
|
}
|
|
6177
|
-
class
|
|
6174
|
+
class gt {
|
|
6178
6175
|
/** @internal */
|
|
6179
6176
|
constructor(e) {
|
|
6180
6177
|
this.core = e;
|
|
@@ -6392,7 +6389,7 @@ class vt {
|
|
|
6392
6389
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/users/${s(e)}`, body: t }, r);
|
|
6393
6390
|
}
|
|
6394
6391
|
}
|
|
6395
|
-
class
|
|
6392
|
+
class vt {
|
|
6396
6393
|
/** @internal */
|
|
6397
6394
|
constructor(e) {
|
|
6398
6395
|
this.core = e;
|
|
@@ -6402,9 +6399,10 @@ class Tt {
|
|
|
6402
6399
|
* Create webhook subscription.
|
|
6403
6400
|
*
|
|
6404
6401
|
* Register an endpoint for event delivery. The Standard Webhooks signing secret ("whsec_…") is
|
|
6405
|
-
* returned ONLY in this response — store it now. Omit scope
|
|
6402
|
+
* returned ONLY in this response — store it now. Omit scope, or pass "instance", for a client
|
|
6406
6403
|
* subscription; scope "organization" with organization_id creates an organization self-service
|
|
6407
|
-
* subscription
|
|
6404
|
+
* subscription, and scope "workspace" with workspace_id one of a workspace's webhooks in the Platform
|
|
6405
|
+
* Plane instance, which platform-management-api creates.
|
|
6408
6406
|
*
|
|
6409
6407
|
* `POST /v1/webhooks/subscriptions` (CreateWebhookSubscription)
|
|
6410
6408
|
*/
|
|
@@ -6589,10 +6587,10 @@ class Tt {
|
|
|
6589
6587
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/webhooks/subscriptions/${s(e)}`, body: t }, r);
|
|
6590
6588
|
}
|
|
6591
6589
|
}
|
|
6592
|
-
function
|
|
6590
|
+
function Tt(i) {
|
|
6593
6591
|
return /^pontive_sk_(?:test|live)_([a-z0-9]+)_/.exec(i.trim())?.[1];
|
|
6594
6592
|
}
|
|
6595
|
-
function
|
|
6593
|
+
function qt(i) {
|
|
6596
6594
|
if (i)
|
|
6597
6595
|
try {
|
|
6598
6596
|
return /(?:^|\.)auth\.([a-z0-9]+)\./i.exec(new URL(i).hostname)?.[1]?.toLowerCase();
|
|
@@ -6608,7 +6606,7 @@ function f(i, e) {
|
|
|
6608
6606
|
return i;
|
|
6609
6607
|
}
|
|
6610
6608
|
}
|
|
6611
|
-
function
|
|
6609
|
+
function Et(i) {
|
|
6612
6610
|
if (!i) return "";
|
|
6613
6611
|
try {
|
|
6614
6612
|
return new URL(i).origin;
|
|
@@ -6617,22 +6615,22 @@ function $t(i) {
|
|
|
6617
6615
|
}
|
|
6618
6616
|
}
|
|
6619
6617
|
const E = (i) => i && i.trim() ? i.trim() : void 0, w = (i) => i.replace(/\/+$/, "");
|
|
6620
|
-
function
|
|
6618
|
+
function $t() {
|
|
6621
6619
|
const i = globalThis;
|
|
6622
6620
|
return typeof i.window < "u" && typeof i.document < "u";
|
|
6623
6621
|
}
|
|
6624
|
-
class
|
|
6622
|
+
class St extends te {
|
|
6625
6623
|
constructor(e = {}) {
|
|
6626
|
-
const t = e.env ??
|
|
6624
|
+
const t = e.env ?? b(), r = e.secretKey ?? E(t.PONTIVE_SECRET_KEY), o = e.issuer ?? E(t.PONTIVE_ISSUER), a = !!(e.clientId && e.clientSecret);
|
|
6627
6625
|
if (!e.token && !r && !a)
|
|
6628
6626
|
throw new Error("pontive: no credential: pass secretKey, token, or clientId and clientSecret, or set PONTIVE_SECRET_KEY");
|
|
6629
|
-
if ((r || e.clientSecret) &&
|
|
6627
|
+
if ((r || e.clientSecret) && $t())
|
|
6630
6628
|
throw new Error("pontive: a secret key or client secret must never reach a browser; call the management API from your server");
|
|
6631
6629
|
if (!e.token && !r && !o)
|
|
6632
6630
|
throw new Error("pontive: client credentials need the issuer to exchange them at: pass issuer or set PONTIVE_ISSUER");
|
|
6633
6631
|
let h = e.managementUrl ?? E(t.PONTIVE_MANAGEMENT_URL);
|
|
6634
6632
|
if (!h) {
|
|
6635
|
-
const T = e.region ?? (r && !e.token ?
|
|
6633
|
+
const T = e.region ?? (r && !e.token ? Tt(r) : void 0) ?? E(t.PONTIVE_REGION) ?? qt(o);
|
|
6636
6634
|
if (T) h = `https://api.${T}.pontive.com`;
|
|
6637
6635
|
else if (!(e.token && o))
|
|
6638
6636
|
throw new Error("pontive: no region: pass region or managementUrl, or use a secret key, which names its region");
|
|
@@ -6641,7 +6639,7 @@ class Ot extends te {
|
|
|
6641
6639
|
api: n,
|
|
6642
6640
|
authz: e.authzUrl ? w(e.authzUrl) : n && f(n, "authz"),
|
|
6643
6641
|
ingest: e.ingestUrl ? w(e.ingestUrl) : n && f(n, "ingest"),
|
|
6644
|
-
auth:
|
|
6642
|
+
auth: Et(o)
|
|
6645
6643
|
}, l = e.fetch ?? globalThis.fetch.bind(globalThis), v = ee({
|
|
6646
6644
|
token: e.token ?? r,
|
|
6647
6645
|
clientId: e.clientId,
|
|
@@ -6675,15 +6673,15 @@ export {
|
|
|
6675
6673
|
R as a,
|
|
6676
6674
|
G as b,
|
|
6677
6675
|
x as c,
|
|
6678
|
-
|
|
6679
|
-
|
|
6676
|
+
St as d,
|
|
6677
|
+
c as e,
|
|
6680
6678
|
A as f,
|
|
6681
6679
|
H as g,
|
|
6682
6680
|
$ as h,
|
|
6683
6681
|
M as i,
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6682
|
+
Pt as k,
|
|
6683
|
+
b as p,
|
|
6684
|
+
Tt as s,
|
|
6685
|
+
bt as w
|
|
6688
6686
|
};
|
|
6689
|
-
//# sourceMappingURL=client-
|
|
6687
|
+
//# sourceMappingURL=client-B3NStbMW.js.map
|