@pymthouse/builder-sdk 0.4.2-rc.0 → 0.4.3
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-D1Xz-xlx.d.cts → client-C0HgAugK.d.cts} +1 -0
- package/dist/{client-CauCfGa7.d.ts → client-zCskUJag.d.ts} +1 -0
- package/dist/env.cjs +11 -4
- package/dist/env.cjs.map +1 -1
- package/dist/env.d.cts +1 -1
- package/dist/env.d.ts +1 -1
- package/dist/env.js +11 -4
- package/dist/env.js.map +1 -1
- package/dist/index.cjs +11 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ export { NETWORK_USD_PER_MICRO, applyRetailRateToNetworkMicros, defaultRetailRat
|
|
|
2
2
|
import { S as SignedTicketIngestInput, F as FetchLike, f as SignedTicketIngestResult, r as UsageByUserRow, s as UsageForExternalUser, e as UsageApiResponse, n as MeScopeUsagePayload, t as UsageByPipelineModelRow, u as UsageByPipelineModelFiatRow, O as OidcDiscoveryDocument, v as AppManifestResponse } from './types-BORaHW_x.cjs';
|
|
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
|
-
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-
|
|
5
|
+
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-C0HgAugK.cjs';
|
|
6
6
|
export { PYMTHOUSE_NOT_CONFIGURED_MESSAGE, getBuilderApiV1BaseFromIssuerUrl, getPymthouseIssuerOrigin, getPymthouseIssuerUrlFromEnv, getPymthousePublicClientIdFromEnv, isPymthouseConfigured, readPymthouseEnv } from './config.cjs';
|
|
7
7
|
import { AuthorizationServer } from 'oauth4webapi';
|
|
8
8
|
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';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { NETWORK_USD_PER_MICRO, applyRetailRateToNetworkMicros, defaultRetailRat
|
|
|
2
2
|
import { S as SignedTicketIngestInput, F as FetchLike, f as SignedTicketIngestResult, r as UsageByUserRow, s as UsageForExternalUser, e as UsageApiResponse, n as MeScopeUsagePayload, t as UsageByPipelineModelRow, u as UsageByPipelineModelFiatRow, O as OidcDiscoveryDocument, v as AppManifestResponse } from './types-BORaHW_x.js';
|
|
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
|
-
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-
|
|
5
|
+
export { P as PmtHouseClient, b as buildDeviceCodeResource, n as normalizeUserCode } from './client-zCskUJag.js';
|
|
6
6
|
export { PYMTHOUSE_NOT_CONFIGURED_MESSAGE, getBuilderApiV1BaseFromIssuerUrl, getPymthouseIssuerOrigin, getPymthouseIssuerUrlFromEnv, getPymthousePublicClientIdFromEnv, isPymthouseConfigured, readPymthouseEnv } from './config.js';
|
|
7
7
|
import { AuthorizationServer } from 'oauth4webapi';
|
|
8
8
|
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';
|
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)
|
|
@@ -1625,7 +1630,8 @@ var PmtHouseClient = class {
|
|
|
1625
1630
|
const usageByUser = await this.getUsage({
|
|
1626
1631
|
startDate: input.startDate,
|
|
1627
1632
|
endDate: input.endDate,
|
|
1628
|
-
groupBy: "user"
|
|
1633
|
+
groupBy: "user",
|
|
1634
|
+
includeRetail: input.includeRetail
|
|
1629
1635
|
});
|
|
1630
1636
|
const userIds = getEndUserIdsForExternalUser(usageByUser, input.externalUserId);
|
|
1631
1637
|
const cap = input.maxEndUserIds ?? DEFAULT_MAX_END_USER_IDS;
|
|
@@ -1636,7 +1642,8 @@ var PmtHouseClient = class {
|
|
|
1636
1642
|
startDate: input.startDate,
|
|
1637
1643
|
endDate: input.endDate,
|
|
1638
1644
|
groupBy: "pipeline_model",
|
|
1639
|
-
userId
|
|
1645
|
+
userId,
|
|
1646
|
+
includeRetail: input.includeRetail
|
|
1640
1647
|
})
|
|
1641
1648
|
)
|
|
1642
1649
|
);
|