@pontive/server 1.26.0 → 1.28.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-BkRsOrbo.cjs +2 -0
- package/dist/client-BkRsOrbo.cjs.map +1 -0
- package/dist/{client-BI4W1IJJ.js → client-DhAfqKrD.js} +99 -104
- package/dist/client-DhAfqKrD.js.map +1 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1371 -439
- package/dist/index.js.map +1 -1
- package/dist/management/generated/namespaces.d.cts +20 -27
- package/dist/management/generated/namespaces.d.ts +20 -27
- package/dist/management/generated/types.d.cts +105 -101
- package/dist/management/generated/types.d.ts +105 -101
- package/dist/management.cjs +1 -1
- package/dist/management.js +1 -1
- package/dist/platform/client.d.cts +49 -0
- package/dist/platform/client.d.ts +49 -0
- package/dist/platform/core.d.cts +1 -0
- package/dist/platform/core.d.ts +1 -0
- package/dist/platform/generated/namespaces.d.cts +767 -0
- package/dist/platform/generated/namespaces.d.ts +767 -0
- package/dist/platform/generated/types.d.cts +2075 -0
- package/dist/platform/generated/types.d.ts +2075 -0
- package/dist/platform/index.d.cts +6 -0
- package/dist/platform/index.d.ts +6 -0
- package/package.json +1 -1
- package/dist/client-BI4W1IJJ.js.map +0 -1
- package/dist/client-fmMA2Var.cjs +0 -2
- package/dist/client-fmMA2Var.cjs.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.28.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;
|
|
@@ -2416,6 +2415,24 @@ class fe {
|
|
|
2416
2415
|
get(e, t) {
|
|
2417
2416
|
return this.core.request({ host: "api", method: "GET", path: `/v1/billing/customers/${s(e)}` }, t);
|
|
2418
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
|
+
}
|
|
2419
2436
|
/**
|
|
2420
2437
|
* billing.customer.v1.CustomerService/ListCustomers (32-billing-overview.md, API Surface).
|
|
2421
2438
|
*
|
|
@@ -3608,30 +3625,6 @@ class je {
|
|
|
3608
3625
|
}
|
|
3609
3626
|
}
|
|
3610
3627
|
class We {
|
|
3611
|
-
/** @internal */
|
|
3612
|
-
constructor(e) {
|
|
3613
|
-
this.core = e;
|
|
3614
|
-
}
|
|
3615
|
-
core;
|
|
3616
|
-
/**
|
|
3617
|
-
* billing.entitlement.v1.SubjectStateService/GetSubjectState (32-billing-overview.md, API Surface,
|
|
3618
|
-
* Subject states; Data Model, Subject state). The subject's current state: its package, every feature
|
|
3619
|
-
* it resolves a value for by key ({ type, value } for a boolean or numeric feature, { type, allowance,
|
|
3620
|
-
* per, limit, overage, exhausted } for a metered one; billing-svc docs/questions.md, P107),
|
|
3621
|
-
* seat_limit, suspended and suspension_cause, with a version that increases on every change. A subject
|
|
3622
|
-
* with no state yet answers the defaults with version 0: customer_id, package and seat_limit null, the
|
|
3623
|
-
* values of default_features as features (a metered default not exhausted), suspended false. Needs
|
|
3624
|
-
* sys:billing:read on the root, and answers while billing is off (billing-svc docs/questions.md, P41).
|
|
3625
|
-
* An unknown subject_type is invalid_subject_type; a user or organization not in the instance is
|
|
3626
|
-
* subject_not_found. The RPC writes nothing, so X-Idempotency-Key is not read.
|
|
3627
|
-
*
|
|
3628
|
-
* `GET /v1/billing/subject-state` (GetSubjectState)
|
|
3629
|
-
*/
|
|
3630
|
-
get(e, t) {
|
|
3631
|
-
return this.core.request({ host: "api", method: "GET", path: "/v1/billing/subject-state", query: e }, t);
|
|
3632
|
-
}
|
|
3633
|
-
}
|
|
3634
|
-
class Ye {
|
|
3635
3628
|
/** @internal */
|
|
3636
3629
|
constructor(e) {
|
|
3637
3630
|
this.core = e;
|
|
@@ -3650,7 +3643,7 @@ class Ye {
|
|
|
3650
3643
|
return this.core.request({ host: "api", method: "POST", path: "/v1/billing/tax/preview", body: e }, t);
|
|
3651
3644
|
}
|
|
3652
3645
|
}
|
|
3653
|
-
class
|
|
3646
|
+
class Ye {
|
|
3654
3647
|
/** @internal */
|
|
3655
3648
|
constructor(e) {
|
|
3656
3649
|
this.core = e;
|
|
@@ -3708,7 +3701,7 @@ class Je {
|
|
|
3708
3701
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/billing/time-machines", query: e }, t);
|
|
3709
3702
|
}
|
|
3710
3703
|
}
|
|
3711
|
-
class
|
|
3704
|
+
class Je {
|
|
3712
3705
|
/** @internal */
|
|
3713
3706
|
constructor(e) {
|
|
3714
3707
|
this.core = e;
|
|
@@ -3773,10 +3766,10 @@ class Xe {
|
|
|
3773
3766
|
return this.core.request({ host: "ingest", method: "POST", path: "/v1/usage/events/void", body: e, idempotent: !0 }, t);
|
|
3774
3767
|
}
|
|
3775
3768
|
}
|
|
3776
|
-
class
|
|
3769
|
+
class Xe {
|
|
3777
3770
|
/** @internal */
|
|
3778
3771
|
constructor(e) {
|
|
3779
|
-
this.core = e, this.blueprints = new
|
|
3772
|
+
this.core = e, this.blueprints = new Qe(e), this.localization = new Ze(e);
|
|
3780
3773
|
}
|
|
3781
3774
|
core;
|
|
3782
3775
|
blueprints;
|
|
@@ -3838,7 +3831,7 @@ class Qe {
|
|
|
3838
3831
|
return this.core.request({ host: "api", method: "POST", path: "/v1/branding/document/import", headers: { "If-Match": o }, body: e, idempotent: !0 }, r);
|
|
3839
3832
|
}
|
|
3840
3833
|
}
|
|
3841
|
-
class
|
|
3834
|
+
class Qe {
|
|
3842
3835
|
/** @internal */
|
|
3843
3836
|
constructor(e) {
|
|
3844
3837
|
this.core = e;
|
|
@@ -3856,7 +3849,7 @@ class Ze {
|
|
|
3856
3849
|
return this.core.request({ host: "api", method: "DELETE", path: `/v1/branding/blueprints/${s(e)}` }, t);
|
|
3857
3850
|
}
|
|
3858
3851
|
}
|
|
3859
|
-
class
|
|
3852
|
+
class Ze {
|
|
3860
3853
|
/** @internal */
|
|
3861
3854
|
constructor(e) {
|
|
3862
3855
|
this.core = e;
|
|
@@ -3887,16 +3880,16 @@ class et {
|
|
|
3887
3880
|
return this.core.request({ host: "api", method: "PATCH", path: "/v1/branding/localization", headers: { "If-Match": o }, body: e }, r);
|
|
3888
3881
|
}
|
|
3889
3882
|
}
|
|
3890
|
-
class
|
|
3883
|
+
class et {
|
|
3891
3884
|
/** @internal */
|
|
3892
3885
|
constructor(e) {
|
|
3893
|
-
this.core = e, this.billing = new
|
|
3886
|
+
this.core = e, this.billing = new tt(e), this.fga = new rt(e);
|
|
3894
3887
|
}
|
|
3895
3888
|
core;
|
|
3896
3889
|
billing;
|
|
3897
3890
|
fga;
|
|
3898
3891
|
}
|
|
3899
|
-
class
|
|
3892
|
+
class tt {
|
|
3900
3893
|
/** @internal */
|
|
3901
3894
|
constructor(e) {
|
|
3902
3895
|
this.core = e;
|
|
@@ -3923,7 +3916,7 @@ class rt {
|
|
|
3923
3916
|
return this.core.request({ host: "api", method: "POST", path: "/v1/capabilities/billing/enable", idempotent: !0 }, e);
|
|
3924
3917
|
}
|
|
3925
3918
|
}
|
|
3926
|
-
class
|
|
3919
|
+
class rt {
|
|
3927
3920
|
/** @internal */
|
|
3928
3921
|
constructor(e) {
|
|
3929
3922
|
this.core = e;
|
|
@@ -3952,7 +3945,7 @@ class st {
|
|
|
3952
3945
|
return this.core.request({ host: "api", method: "POST", path: "/v1/capabilities/fga/enable" }, e);
|
|
3953
3946
|
}
|
|
3954
3947
|
}
|
|
3955
|
-
class
|
|
3948
|
+
class st {
|
|
3956
3949
|
/** @internal */
|
|
3957
3950
|
constructor(e) {
|
|
3958
3951
|
this.core = e;
|
|
@@ -3975,7 +3968,7 @@ class it {
|
|
|
3975
3968
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/countries", query: e }, t);
|
|
3976
3969
|
}
|
|
3977
3970
|
}
|
|
3978
|
-
class
|
|
3971
|
+
class it {
|
|
3979
3972
|
/** @internal */
|
|
3980
3973
|
constructor(e) {
|
|
3981
3974
|
this.core = e;
|
|
@@ -4033,7 +4026,7 @@ class ot {
|
|
|
4033
4026
|
return this.core.page("page", { host: "api", method: "GET", path: "/v1/delegations", query: e }, t);
|
|
4034
4027
|
}
|
|
4035
4028
|
}
|
|
4036
|
-
class
|
|
4029
|
+
class ot {
|
|
4037
4030
|
/** @internal */
|
|
4038
4031
|
constructor(e) {
|
|
4039
4032
|
this.core = e;
|
|
@@ -4147,7 +4140,7 @@ class at {
|
|
|
4147
4140
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/groups/${s(e)}`, body: t }, r);
|
|
4148
4141
|
}
|
|
4149
4142
|
}
|
|
4150
|
-
class
|
|
4143
|
+
class at {
|
|
4151
4144
|
/** @internal */
|
|
4152
4145
|
constructor(e) {
|
|
4153
4146
|
this.core = e;
|
|
@@ -4201,10 +4194,10 @@ class ht {
|
|
|
4201
4194
|
return this.core.page("cursor", { host: "api", method: "GET", path: "/v1/logs/requests", query: e }, t);
|
|
4202
4195
|
}
|
|
4203
4196
|
}
|
|
4204
|
-
class
|
|
4197
|
+
class ht {
|
|
4205
4198
|
/** @internal */
|
|
4206
4199
|
constructor(e) {
|
|
4207
|
-
this.core = e, this.billing = new
|
|
4200
|
+
this.core = e, this.billing = new nt(e);
|
|
4208
4201
|
}
|
|
4209
4202
|
core;
|
|
4210
4203
|
billing;
|
|
@@ -4307,7 +4300,7 @@ class nt {
|
|
|
4307
4300
|
return this.core.request({ host: "auth", method: "PATCH", path: "/v1/me", body: e }, t);
|
|
4308
4301
|
}
|
|
4309
4302
|
}
|
|
4310
|
-
class
|
|
4303
|
+
class nt {
|
|
4311
4304
|
/** @internal */
|
|
4312
4305
|
constructor(e) {
|
|
4313
4306
|
this.core = e;
|
|
@@ -4389,7 +4382,7 @@ class ut {
|
|
|
4389
4382
|
* End-customer portal; billing-svc P124). Cancels the contract's pending change, a scheduled
|
|
4390
4383
|
* downgrade, by deleting its edit: edit_id is the contract's pending_change.edit_id, and any other
|
|
4391
4384
|
* edit is not_found. Only a change the end customer asked for, pending_change.initiated_by customer,
|
|
4392
|
-
* 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
|
|
4393
4386
|
* written as for DELETE /v1/billing/contracts/{contract_id}/edits/{edit_id}. An instance user's token
|
|
4394
4387
|
* must be issued for the instance's me audience, https://{auth domain}/me/, with pontive:billing:pay
|
|
4395
4388
|
* (D31, D48).
|
|
@@ -5257,7 +5250,7 @@ class ct {
|
|
|
5257
5250
|
return this.core.request({ host: "api", method: "PATCH", path: "/v1/organizations/settings", headers: { "If-Match": o }, body: e }, r);
|
|
5258
5251
|
}
|
|
5259
5252
|
}
|
|
5260
|
-
class
|
|
5253
|
+
class ut {
|
|
5261
5254
|
/** @internal */
|
|
5262
5255
|
constructor(e) {
|
|
5263
5256
|
this.core = e;
|
|
@@ -5317,7 +5310,7 @@ class pt {
|
|
|
5317
5310
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/personal-access-tokens/${s(e)}`, body: t }, r);
|
|
5318
5311
|
}
|
|
5319
5312
|
}
|
|
5320
|
-
class
|
|
5313
|
+
class pt {
|
|
5321
5314
|
/** @internal */
|
|
5322
5315
|
constructor(e) {
|
|
5323
5316
|
this.core = e;
|
|
@@ -5584,7 +5577,7 @@ class lt {
|
|
|
5584
5577
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/resources/${s(e)}/members/${s(t)}`, body: r }, o);
|
|
5585
5578
|
}
|
|
5586
5579
|
}
|
|
5587
|
-
class
|
|
5580
|
+
class lt {
|
|
5588
5581
|
/** @internal */
|
|
5589
5582
|
constructor(e) {
|
|
5590
5583
|
this.core = e;
|
|
@@ -5823,7 +5816,7 @@ class dt {
|
|
|
5823
5816
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/root/members/${s(e)}`, body: t }, r);
|
|
5824
5817
|
}
|
|
5825
5818
|
}
|
|
5826
|
-
class
|
|
5819
|
+
class dt {
|
|
5827
5820
|
/** @internal */
|
|
5828
5821
|
constructor(e) {
|
|
5829
5822
|
this.core = e;
|
|
@@ -6099,7 +6092,7 @@ class mt {
|
|
|
6099
6092
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/service-accounts/${s(e)}/token-config`, headers: { "If-Match": a }, body: t }, o);
|
|
6100
6093
|
}
|
|
6101
6094
|
}
|
|
6102
|
-
class
|
|
6095
|
+
class mt {
|
|
6103
6096
|
/** @internal */
|
|
6104
6097
|
constructor(e) {
|
|
6105
6098
|
this.core = e;
|
|
@@ -6178,7 +6171,7 @@ class gt {
|
|
|
6178
6171
|
return this.core.request({ host: "api", method: "POST", path: `/v1/user-imports/${s(e)}/revert`, body: t }, r);
|
|
6179
6172
|
}
|
|
6180
6173
|
}
|
|
6181
|
-
class
|
|
6174
|
+
class gt {
|
|
6182
6175
|
/** @internal */
|
|
6183
6176
|
constructor(e) {
|
|
6184
6177
|
this.core = e;
|
|
@@ -6396,7 +6389,7 @@ class vt {
|
|
|
6396
6389
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/users/${s(e)}`, body: t }, r);
|
|
6397
6390
|
}
|
|
6398
6391
|
}
|
|
6399
|
-
class
|
|
6392
|
+
class vt {
|
|
6400
6393
|
/** @internal */
|
|
6401
6394
|
constructor(e) {
|
|
6402
6395
|
this.core = e;
|
|
@@ -6406,9 +6399,10 @@ class Tt {
|
|
|
6406
6399
|
* Create webhook subscription.
|
|
6407
6400
|
*
|
|
6408
6401
|
* Register an endpoint for event delivery. The Standard Webhooks signing secret ("whsec_…") is
|
|
6409
|
-
* 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
|
|
6410
6403
|
* subscription; scope "organization" with organization_id creates an organization self-service
|
|
6411
|
-
* 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.
|
|
6412
6406
|
*
|
|
6413
6407
|
* `POST /v1/webhooks/subscriptions` (CreateWebhookSubscription)
|
|
6414
6408
|
*/
|
|
@@ -6593,10 +6587,10 @@ class Tt {
|
|
|
6593
6587
|
return this.core.request({ host: "api", method: "PATCH", path: `/v1/webhooks/subscriptions/${s(e)}`, body: t }, r);
|
|
6594
6588
|
}
|
|
6595
6589
|
}
|
|
6596
|
-
function
|
|
6590
|
+
function Tt(i) {
|
|
6597
6591
|
return /^pontive_sk_(?:test|live)_([a-z0-9]+)_/.exec(i.trim())?.[1];
|
|
6598
6592
|
}
|
|
6599
|
-
function
|
|
6593
|
+
function qt(i) {
|
|
6600
6594
|
if (i)
|
|
6601
6595
|
try {
|
|
6602
6596
|
return /(?:^|\.)auth\.([a-z0-9]+)\./i.exec(new URL(i).hostname)?.[1]?.toLowerCase();
|
|
@@ -6612,7 +6606,7 @@ function f(i, e) {
|
|
|
6612
6606
|
return i;
|
|
6613
6607
|
}
|
|
6614
6608
|
}
|
|
6615
|
-
function
|
|
6609
|
+
function Et(i) {
|
|
6616
6610
|
if (!i) return "";
|
|
6617
6611
|
try {
|
|
6618
6612
|
return new URL(i).origin;
|
|
@@ -6621,22 +6615,22 @@ function $t(i) {
|
|
|
6621
6615
|
}
|
|
6622
6616
|
}
|
|
6623
6617
|
const E = (i) => i && i.trim() ? i.trim() : void 0, w = (i) => i.replace(/\/+$/, "");
|
|
6624
|
-
function
|
|
6618
|
+
function $t() {
|
|
6625
6619
|
const i = globalThis;
|
|
6626
6620
|
return typeof i.window < "u" && typeof i.document < "u";
|
|
6627
6621
|
}
|
|
6628
|
-
class
|
|
6622
|
+
class St extends te {
|
|
6629
6623
|
constructor(e = {}) {
|
|
6630
|
-
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);
|
|
6631
6625
|
if (!e.token && !r && !a)
|
|
6632
6626
|
throw new Error("pontive: no credential: pass secretKey, token, or clientId and clientSecret, or set PONTIVE_SECRET_KEY");
|
|
6633
|
-
if ((r || e.clientSecret) &&
|
|
6627
|
+
if ((r || e.clientSecret) && $t())
|
|
6634
6628
|
throw new Error("pontive: a secret key or client secret must never reach a browser; call the management API from your server");
|
|
6635
6629
|
if (!e.token && !r && !o)
|
|
6636
6630
|
throw new Error("pontive: client credentials need the issuer to exchange them at: pass issuer or set PONTIVE_ISSUER");
|
|
6637
6631
|
let h = e.managementUrl ?? E(t.PONTIVE_MANAGEMENT_URL);
|
|
6638
6632
|
if (!h) {
|
|
6639
|
-
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);
|
|
6640
6634
|
if (T) h = `https://api.${T}.pontive.com`;
|
|
6641
6635
|
else if (!(e.token && o))
|
|
6642
6636
|
throw new Error("pontive: no region: pass region or managementUrl, or use a secret key, which names its region");
|
|
@@ -6645,7 +6639,7 @@ class Ot extends te {
|
|
|
6645
6639
|
api: n,
|
|
6646
6640
|
authz: e.authzUrl ? w(e.authzUrl) : n && f(n, "authz"),
|
|
6647
6641
|
ingest: e.ingestUrl ? w(e.ingestUrl) : n && f(n, "ingest"),
|
|
6648
|
-
auth:
|
|
6642
|
+
auth: Et(o)
|
|
6649
6643
|
}, l = e.fetch ?? globalThis.fetch.bind(globalThis), v = ee({
|
|
6650
6644
|
token: e.token ?? r,
|
|
6651
6645
|
clientId: e.clientId,
|
|
@@ -6679,15 +6673,16 @@ export {
|
|
|
6679
6673
|
R as a,
|
|
6680
6674
|
G as b,
|
|
6681
6675
|
x as c,
|
|
6682
|
-
|
|
6683
|
-
|
|
6676
|
+
St as d,
|
|
6677
|
+
c as e,
|
|
6684
6678
|
A as f,
|
|
6685
6679
|
H as g,
|
|
6686
|
-
|
|
6680
|
+
W as h,
|
|
6687
6681
|
M as i,
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6682
|
+
$ as j,
|
|
6683
|
+
Pt as k,
|
|
6684
|
+
b as p,
|
|
6685
|
+
Tt as s,
|
|
6686
|
+
bt as w
|
|
6692
6687
|
};
|
|
6693
|
-
//# sourceMappingURL=client-
|
|
6688
|
+
//# sourceMappingURL=client-DhAfqKrD.js.map
|