@pymthouse/builder-sdk 0.4.2-rc.1 → 0.4.4
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/env.cjs +7 -2
- package/dist/env.cjs.map +1 -1
- package/dist/env.js +7 -2
- package/dist/env.js.map +1 -1
- package/dist/errors-C9-V_zSi.d.cts +13 -0
- package/dist/errors-C9-V_zSi.d.ts +13 -0
- package/dist/{index-DFJ6qcK0.d.ts → index-BL1wpOki.d.ts} +1 -1
- package/dist/{index-D5wdxNYy.d.cts → index-CAIAYJv7.d.cts} +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -13
- package/dist/index.d.ts +2 -13
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/signer/webhook/adapters/api-key.d.cts +1 -1
- package/dist/signer/webhook/adapters/api-key.d.ts +1 -1
- package/dist/signer/webhook/adapters/composite.d.cts +1 -1
- package/dist/signer/webhook/adapters/composite.d.ts +1 -1
- package/dist/signer/webhook/adapters/oidc.cjs.map +1 -1
- package/dist/signer/webhook/adapters/oidc.d.cts +2 -2
- package/dist/signer/webhook/adapters/oidc.d.ts +2 -2
- package/dist/signer/webhook/adapters/oidc.js.map +1 -1
- package/dist/signer/webhook/adapters/trusted-headers.d.cts +1 -1
- package/dist/signer/webhook/adapters/trusted-headers.d.ts +1 -1
- package/dist/signer/webhook.cjs +40 -6
- package/dist/signer/webhook.cjs.map +1 -1
- package/dist/signer/webhook.d.cts +22 -5
- package/dist/signer/webhook.d.ts +22 -5
- package/dist/signer/webhook.js +37 -7
- package/dist/signer/webhook.js.map +1 -1
- package/dist/{verifier-Be9WAjFF.d.cts → verifier-D8z3spC0.d.cts} +2 -0
- package/dist/{verifier-Be9WAjFF.d.ts → verifier-D8z3spC0.d.ts} +2 -0
- package/package.json +8 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,7 @@ import { S as SignedTicketIngestInput, F as FetchLike, f as SignedTicketIngestRe
|
|
|
3
3
|
export { w as AllowancePolicy, x as AppManifestCapability, A as AppUserRecord, q as ApproveDeviceLoginInput, B as BillingProduct, y as BillingSyncState, z as BillingSyncStatus, E as CapabilityPriceRule, C as ClientCredentialsTokenResponse, D as DeviceApprovalInput, o as GetAppManifestResult, G as GetDiscoveryOptions, l as GrantSource, L as ListBillingProductsResult, p as MintSignerSessionForExternalUserInput, M as MintUserAccessTokenInput, b as MintUserAccessTokenResponse, c as MintUserSignerSessionTokenInput, a as ParsedDeviceApprovalRedirect, h as PlanSyncResult, P as PmtHouseClientOptions, H as SignerRoutingConfig, g as SignerRoutingResponse, T as TokenExchangeResponse, U as UpsertAppUserInput, i as UsageBalanceResponse, I as UsageDailyPipelineRow, d as UsageQueryInput, J as UsageTotals, k as UserAllowanceGrantInput, j as UserAllowancesResponse, K as UserCreditGrantInput, N as UserCreditsResponse, m as UserSubscriptionResponse } from './types-BORaHW_x.cjs';
|
|
4
4
|
import { S as SignerUsageSnapshot } from './proxy-0wa8QZIU.cjs';
|
|
5
5
|
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-C0HgAugK.cjs';
|
|
6
|
+
export { P as PmtHouseError, t as toPmtHouseError } from './errors-C9-V_zSi.cjs';
|
|
6
7
|
export { PYMTHOUSE_NOT_CONFIGURED_MESSAGE, getBuilderApiV1BaseFromIssuerUrl, getPymthouseIssuerOrigin, getPymthouseIssuerUrlFromEnv, getPymthousePublicClientIdFromEnv, isPymthouseConfigured, readPymthouseEnv } from './config.cjs';
|
|
7
8
|
import { AuthorizationServer } from 'oauth4webapi';
|
|
8
9
|
export { PYMTHOUSE_SIGNER_SESSION_TTL_MS, SIGNER_SESSION_EXPIRES_IN_SEC, SIGNER_SESSION_TTL_MS, SIGN_JOB_SCOPE, SignerSessionToken, computePymthouseExpiry, computeSignerSessionExpiry, decodeJwtExp, isLikelyOidcJwt, isOpaqueSignerSessionToken, parseSignerSessionExchange } from './tokens.cjs';
|
|
@@ -77,18 +78,6 @@ declare function buildMeScopeUsagePayload(usageByUser: UsageApiResponse, externa
|
|
|
77
78
|
/** Default cap for parallel pipeline_model fetches per external user (matches NaaP BFF). */
|
|
78
79
|
declare const DEFAULT_MAX_END_USER_IDS = 25;
|
|
79
80
|
|
|
80
|
-
declare class PmtHouseError extends Error {
|
|
81
|
-
readonly status: number;
|
|
82
|
-
readonly code: string;
|
|
83
|
-
readonly details?: unknown;
|
|
84
|
-
constructor(message: string, { status, code, details, }?: {
|
|
85
|
-
status?: number;
|
|
86
|
-
code?: string;
|
|
87
|
-
details?: unknown;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
declare function toPmtHouseError(error: unknown, fallbackMessage: string): PmtHouseError;
|
|
91
|
-
|
|
92
81
|
declare function authorizationServerToOidcDocument(as: AuthorizationServer): OidcDiscoveryDocument;
|
|
93
82
|
interface LoadAuthorizationServerOptions {
|
|
94
83
|
force?: boolean;
|
|
@@ -104,4 +93,4 @@ declare function clearDiscoveryCache(issuerUrl?: string): void;
|
|
|
104
93
|
declare function parseAppManifestResponse(json: unknown): AppManifestResponse;
|
|
105
94
|
declare function computeManifestRevision(data: Pick<AppManifestResponse, "capabilities" | "excludedCapabilities" | "manifestVersion"> | null): string;
|
|
106
95
|
|
|
107
|
-
export { AppManifestResponse, DEFAULT_MAX_END_USER_IDS, FetchLike, type LoadAuthorizationServerOptions, MeScopeUsagePayload, OidcDiscoveryDocument,
|
|
96
|
+
export { AppManifestResponse, DEFAULT_MAX_END_USER_IDS, FetchLike, type LoadAuthorizationServerOptions, MeScopeUsagePayload, OidcDiscoveryDocument, SignedTicketIngestInput, SignedTicketIngestResult, UsageApiResponse, UsageByPipelineModelFiatRow, UsageByPipelineModelRow, UsageByUserRow, UsageForExternalUser, aggregateUsageByExternalUserId, authorizationServerToOidcDocument, buildMeScopeUsagePayload, clearDiscoveryCache, computeManifestRevision, fetchDiscoveryDocument, getEndUserIdsForExternalUser, getUsageRecordUserIdsForExternalUser, getUtcCalendarMonthIsoBounds, ingestSignedTicket, ingestSignedTicketsBatch, listUsageByPipelineModel, loadAuthorizationServer, mergeUsageByPipelineModel, parseAppManifestResponse, parseUsageDateParam, signerSnapshotToIngestPayload, summarizeUsageFiatForExternalUser, summarizeUsageForExternalUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { S as SignedTicketIngestInput, F as FetchLike, f as SignedTicketIngestRe
|
|
|
3
3
|
export { w as AllowancePolicy, x as AppManifestCapability, A as AppUserRecord, q as ApproveDeviceLoginInput, B as BillingProduct, y as BillingSyncState, z as BillingSyncStatus, E as CapabilityPriceRule, C as ClientCredentialsTokenResponse, D as DeviceApprovalInput, o as GetAppManifestResult, G as GetDiscoveryOptions, l as GrantSource, L as ListBillingProductsResult, p as MintSignerSessionForExternalUserInput, M as MintUserAccessTokenInput, b as MintUserAccessTokenResponse, c as MintUserSignerSessionTokenInput, a as ParsedDeviceApprovalRedirect, h as PlanSyncResult, P as PmtHouseClientOptions, H as SignerRoutingConfig, g as SignerRoutingResponse, T as TokenExchangeResponse, U as UpsertAppUserInput, i as UsageBalanceResponse, I as UsageDailyPipelineRow, d as UsageQueryInput, J as UsageTotals, k as UserAllowanceGrantInput, j as UserAllowancesResponse, K as UserCreditGrantInput, N as UserCreditsResponse, m as UserSubscriptionResponse } from './types-BORaHW_x.js';
|
|
4
4
|
import { S as SignerUsageSnapshot } from './proxy-KrA1vEmh.js';
|
|
5
5
|
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-zCskUJag.js';
|
|
6
|
+
export { P as PmtHouseError, t as toPmtHouseError } from './errors-C9-V_zSi.js';
|
|
6
7
|
export { PYMTHOUSE_NOT_CONFIGURED_MESSAGE, getBuilderApiV1BaseFromIssuerUrl, getPymthouseIssuerOrigin, getPymthouseIssuerUrlFromEnv, getPymthousePublicClientIdFromEnv, isPymthouseConfigured, readPymthouseEnv } from './config.js';
|
|
7
8
|
import { AuthorizationServer } from 'oauth4webapi';
|
|
8
9
|
export { PYMTHOUSE_SIGNER_SESSION_TTL_MS, SIGNER_SESSION_EXPIRES_IN_SEC, SIGNER_SESSION_TTL_MS, SIGN_JOB_SCOPE, SignerSessionToken, computePymthouseExpiry, computeSignerSessionExpiry, decodeJwtExp, isLikelyOidcJwt, isOpaqueSignerSessionToken, parseSignerSessionExchange } from './tokens.js';
|
|
@@ -77,18 +78,6 @@ declare function buildMeScopeUsagePayload(usageByUser: UsageApiResponse, externa
|
|
|
77
78
|
/** Default cap for parallel pipeline_model fetches per external user (matches NaaP BFF). */
|
|
78
79
|
declare const DEFAULT_MAX_END_USER_IDS = 25;
|
|
79
80
|
|
|
80
|
-
declare class PmtHouseError extends Error {
|
|
81
|
-
readonly status: number;
|
|
82
|
-
readonly code: string;
|
|
83
|
-
readonly details?: unknown;
|
|
84
|
-
constructor(message: string, { status, code, details, }?: {
|
|
85
|
-
status?: number;
|
|
86
|
-
code?: string;
|
|
87
|
-
details?: unknown;
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
declare function toPmtHouseError(error: unknown, fallbackMessage: string): PmtHouseError;
|
|
91
|
-
|
|
92
81
|
declare function authorizationServerToOidcDocument(as: AuthorizationServer): OidcDiscoveryDocument;
|
|
93
82
|
interface LoadAuthorizationServerOptions {
|
|
94
83
|
force?: boolean;
|
|
@@ -104,4 +93,4 @@ declare function clearDiscoveryCache(issuerUrl?: string): void;
|
|
|
104
93
|
declare function parseAppManifestResponse(json: unknown): AppManifestResponse;
|
|
105
94
|
declare function computeManifestRevision(data: Pick<AppManifestResponse, "capabilities" | "excludedCapabilities" | "manifestVersion"> | null): string;
|
|
106
95
|
|
|
107
|
-
export { AppManifestResponse, DEFAULT_MAX_END_USER_IDS, FetchLike, type LoadAuthorizationServerOptions, MeScopeUsagePayload, OidcDiscoveryDocument,
|
|
96
|
+
export { AppManifestResponse, DEFAULT_MAX_END_USER_IDS, FetchLike, type LoadAuthorizationServerOptions, MeScopeUsagePayload, OidcDiscoveryDocument, SignedTicketIngestInput, SignedTicketIngestResult, UsageApiResponse, UsageByPipelineModelFiatRow, UsageByPipelineModelRow, UsageByUserRow, UsageForExternalUser, aggregateUsageByExternalUserId, authorizationServerToOidcDocument, buildMeScopeUsagePayload, clearDiscoveryCache, computeManifestRevision, fetchDiscoveryDocument, getEndUserIdsForExternalUser, getUsageRecordUserIdsForExternalUser, getUtcCalendarMonthIsoBounds, ingestSignedTicket, ingestSignedTicketsBatch, listUsageByPipelineModel, loadAuthorizationServer, mergeUsageByPipelineModel, parseAppManifestResponse, parseUsageDateParam, signerSnapshotToIngestPayload, summarizeUsageFiatForExternalUser, summarizeUsageForExternalUser };
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,13 @@ import { createHash } from 'crypto';
|
|
|
3
3
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __esm = (fn, res) => function __init() {
|
|
7
|
-
|
|
6
|
+
var __esm = (fn, res, err) => function __init() {
|
|
7
|
+
if (err) throw err[0];
|
|
8
|
+
try {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw err = [e], e;
|
|
12
|
+
}
|
|
8
13
|
};
|
|
9
14
|
var __export = (target, all) => {
|
|
10
15
|
for (var name in all)
|