@pymthouse/builder-sdk 0.0.8 → 0.1.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.
@@ -82,13 +82,22 @@ interface UsageQueryInput {
82
82
  }
83
83
  interface UsageTotals {
84
84
  requestCount: number;
85
- totalFeeWei: string;
85
+ totalFeeWei?: string;
86
+ currency?: string;
87
+ networkFeeUsdMicros?: string;
88
+ ownerChargeUsdMicros?: string;
89
+ platformFeeUsdMicros?: string;
90
+ endUserBillableUsdMicros?: string;
86
91
  }
87
92
  interface UsageByUserRow {
88
93
  endUserId: string;
89
94
  externalUserId: string | null;
90
95
  requestCount: number;
91
- feeWei: string;
96
+ feeWei?: string;
97
+ currency?: string;
98
+ networkFeeUsdMicros?: string;
99
+ ownerChargeUsdMicros?: string;
100
+ endUserBillableUsdMicros?: string;
92
101
  userType?: "system_managed" | "oidc_authorized" | "unknown";
93
102
  identifier?: string;
94
103
  }
@@ -97,7 +106,8 @@ interface UsageByPipelineModelRow {
97
106
  pipeline: string;
98
107
  modelId: string;
99
108
  requestCount: number;
100
- networkFeeWei: string;
109
+ currency?: string;
110
+ networkFeeWei?: string;
101
111
  networkFeeEth?: string;
102
112
  networkFeeUsdMicros: string;
103
113
  ownerChargeUsdMicros: string;
@@ -132,5 +142,55 @@ interface ParsedDeviceApprovalRedirect {
132
142
  userCode: string;
133
143
  clientId: string;
134
144
  }
145
+ interface AppManifestCapability {
146
+ pipeline: string;
147
+ modelId: string;
148
+ }
149
+ interface AppManifestResponse {
150
+ /** PymtHouse-local resolved set; informational, not a complete integrator allowlist. */
151
+ capabilities: AppManifestCapability[];
152
+ /** Authoritative exclusions from the Network Price plan. */
153
+ excludedCapabilities?: AppManifestCapability[];
154
+ /** Server-computed revision for cache busting when present. */
155
+ manifestVersion?: string;
156
+ }
157
+ interface GetAppManifestResult {
158
+ manifest: AppManifestResponse | null;
159
+ etag: string | null;
160
+ notModified: boolean;
161
+ }
162
+ interface UsageByPipelineModelFiatRow {
163
+ pipeline: string;
164
+ modelId: string;
165
+ requestCount: number;
166
+ currency: string;
167
+ networkFeeUsdMicros: string;
168
+ ownerChargeUsdMicros: string;
169
+ endUserBillableUsdMicros: string;
170
+ }
171
+ interface MeScopeUsagePayload {
172
+ clientId: string;
173
+ period: UsageApiResponse["period"];
174
+ currentUser: {
175
+ externalUserId: string;
176
+ requestCount: number;
177
+ currency: string;
178
+ networkFeeUsdMicros: string;
179
+ ownerChargeUsdMicros: string;
180
+ endUserBillableUsdMicros: string;
181
+ pipelineModels: UsageByPipelineModelFiatRow[];
182
+ };
183
+ }
184
+ interface MintSignerSessionForExternalUserInput {
185
+ externalUserId: string;
186
+ email?: string;
187
+ scope?: string;
188
+ }
189
+ interface ApproveDeviceLoginInput {
190
+ externalUserId: string;
191
+ userCode: string;
192
+ email?: string;
193
+ publicClientId?: string;
194
+ }
135
195
 
136
- export type { AppUserRecord as A, ClientCredentialsTokenResponse as C, DeviceApprovalInput as D, FetchLike as F, GetDiscoveryOptions as G, MintUserAccessTokenInput as M, OidcDiscoveryDocument as O, ParsedDeviceApprovalRedirect as P, TokenExchangeResponse as T, UsageByUserRow as U, UsageForExternalUser as a, UsageApiResponse as b, UsageByPipelineModelRow as c, MintUserAccessTokenResponse as d, MintUserSignerSessionTokenInput as e, PmtHouseClientOptions as f, UpsertAppUserInput as g, UsageQueryInput as h, UsageTotals as i };
196
+ export type { AppManifestResponse as A, ClientCredentialsTokenResponse as C, DeviceApprovalInput as D, FetchLike as F, GetAppManifestResult as G, MeScopeUsagePayload as M, OidcDiscoveryDocument as O, ParsedDeviceApprovalRedirect as P, TokenExchangeResponse as T, UsageByUserRow as U, UsageForExternalUser as a, UsageApiResponse as b, UsageByPipelineModelRow as c, UsageByPipelineModelFiatRow as d, AppManifestCapability as e, AppUserRecord as f, ApproveDeviceLoginInput as g, GetDiscoveryOptions as h, MintSignerSessionForExternalUserInput as i, MintUserAccessTokenInput as j, MintUserAccessTokenResponse as k, MintUserSignerSessionTokenInput as l, PmtHouseClientOptions as m, UpsertAppUserInput as n, UsageQueryInput as o, UsageTotals as p };
@@ -82,13 +82,22 @@ interface UsageQueryInput {
82
82
  }
83
83
  interface UsageTotals {
84
84
  requestCount: number;
85
- totalFeeWei: string;
85
+ totalFeeWei?: string;
86
+ currency?: string;
87
+ networkFeeUsdMicros?: string;
88
+ ownerChargeUsdMicros?: string;
89
+ platformFeeUsdMicros?: string;
90
+ endUserBillableUsdMicros?: string;
86
91
  }
87
92
  interface UsageByUserRow {
88
93
  endUserId: string;
89
94
  externalUserId: string | null;
90
95
  requestCount: number;
91
- feeWei: string;
96
+ feeWei?: string;
97
+ currency?: string;
98
+ networkFeeUsdMicros?: string;
99
+ ownerChargeUsdMicros?: string;
100
+ endUserBillableUsdMicros?: string;
92
101
  userType?: "system_managed" | "oidc_authorized" | "unknown";
93
102
  identifier?: string;
94
103
  }
@@ -97,7 +106,8 @@ interface UsageByPipelineModelRow {
97
106
  pipeline: string;
98
107
  modelId: string;
99
108
  requestCount: number;
100
- networkFeeWei: string;
109
+ currency?: string;
110
+ networkFeeWei?: string;
101
111
  networkFeeEth?: string;
102
112
  networkFeeUsdMicros: string;
103
113
  ownerChargeUsdMicros: string;
@@ -132,5 +142,55 @@ interface ParsedDeviceApprovalRedirect {
132
142
  userCode: string;
133
143
  clientId: string;
134
144
  }
145
+ interface AppManifestCapability {
146
+ pipeline: string;
147
+ modelId: string;
148
+ }
149
+ interface AppManifestResponse {
150
+ /** PymtHouse-local resolved set; informational, not a complete integrator allowlist. */
151
+ capabilities: AppManifestCapability[];
152
+ /** Authoritative exclusions from the Network Price plan. */
153
+ excludedCapabilities?: AppManifestCapability[];
154
+ /** Server-computed revision for cache busting when present. */
155
+ manifestVersion?: string;
156
+ }
157
+ interface GetAppManifestResult {
158
+ manifest: AppManifestResponse | null;
159
+ etag: string | null;
160
+ notModified: boolean;
161
+ }
162
+ interface UsageByPipelineModelFiatRow {
163
+ pipeline: string;
164
+ modelId: string;
165
+ requestCount: number;
166
+ currency: string;
167
+ networkFeeUsdMicros: string;
168
+ ownerChargeUsdMicros: string;
169
+ endUserBillableUsdMicros: string;
170
+ }
171
+ interface MeScopeUsagePayload {
172
+ clientId: string;
173
+ period: UsageApiResponse["period"];
174
+ currentUser: {
175
+ externalUserId: string;
176
+ requestCount: number;
177
+ currency: string;
178
+ networkFeeUsdMicros: string;
179
+ ownerChargeUsdMicros: string;
180
+ endUserBillableUsdMicros: string;
181
+ pipelineModels: UsageByPipelineModelFiatRow[];
182
+ };
183
+ }
184
+ interface MintSignerSessionForExternalUserInput {
185
+ externalUserId: string;
186
+ email?: string;
187
+ scope?: string;
188
+ }
189
+ interface ApproveDeviceLoginInput {
190
+ externalUserId: string;
191
+ userCode: string;
192
+ email?: string;
193
+ publicClientId?: string;
194
+ }
135
195
 
136
- export type { AppUserRecord as A, ClientCredentialsTokenResponse as C, DeviceApprovalInput as D, FetchLike as F, GetDiscoveryOptions as G, MintUserAccessTokenInput as M, OidcDiscoveryDocument as O, ParsedDeviceApprovalRedirect as P, TokenExchangeResponse as T, UsageByUserRow as U, UsageForExternalUser as a, UsageApiResponse as b, UsageByPipelineModelRow as c, MintUserAccessTokenResponse as d, MintUserSignerSessionTokenInput as e, PmtHouseClientOptions as f, UpsertAppUserInput as g, UsageQueryInput as h, UsageTotals as i };
196
+ export type { AppManifestResponse as A, ClientCredentialsTokenResponse as C, DeviceApprovalInput as D, FetchLike as F, GetAppManifestResult as G, MeScopeUsagePayload as M, OidcDiscoveryDocument as O, ParsedDeviceApprovalRedirect as P, TokenExchangeResponse as T, UsageByUserRow as U, UsageForExternalUser as a, UsageApiResponse as b, UsageByPipelineModelRow as c, UsageByPipelineModelFiatRow as d, AppManifestCapability as e, AppUserRecord as f, ApproveDeviceLoginInput as g, GetDiscoveryOptions as h, MintSignerSessionForExternalUserInput as i, MintUserAccessTokenInput as j, MintUserAccessTokenResponse as k, MintUserSignerSessionTokenInput as l, PmtHouseClientOptions as m, UpsertAppUserInput as n, UsageQueryInput as o, UsageTotals as p };
package/dist/verify.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JWTAccessTokenClaims } from 'oauth4webapi';
2
- import { F as FetchLike } from './types-W9PJAspR.cjs';
2
+ import { F as FetchLike } from './types-rKzVXvMu.cjs';
3
3
 
4
4
  interface VerifyJwtOptions {
5
5
  issuerUrl: string;
package/dist/verify.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { JWTAccessTokenClaims } from 'oauth4webapi';
2
- import { F as FetchLike } from './types-W9PJAspR.js';
2
+ import { F as FetchLike } from './types-rKzVXvMu.js';
3
3
 
4
4
  interface VerifyJwtOptions {
5
5
  issuerUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pymthouse/builder-sdk",
3
- "version": "0.0.8",
3
+ "version": "0.1.0",
4
4
  "description": "PymtHouse Builder API and OIDC client (OpenID-certified oauth4webapi)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -22,11 +22,26 @@
22
22
  "import": "./dist/env.js",
23
23
  "require": "./dist/env.cjs"
24
24
  },
25
+ "./config": {
26
+ "types": "./dist/config.d.ts",
27
+ "import": "./dist/config.js",
28
+ "require": "./dist/config.cjs"
29
+ },
30
+ "./tokens": {
31
+ "types": "./dist/tokens.d.ts",
32
+ "import": "./dist/tokens.js",
33
+ "require": "./dist/tokens.cjs"
34
+ },
25
35
  "./device": {
26
36
  "types": "./dist/device.d.ts",
27
37
  "import": "./dist/device.js",
28
38
  "require": "./dist/device.cjs"
29
39
  },
40
+ "./device-initiate": {
41
+ "types": "./dist/device-initiate.d.ts",
42
+ "import": "./dist/device-initiate.js",
43
+ "require": "./dist/device-initiate.cjs"
44
+ },
30
45
  "./verify": {
31
46
  "types": "./dist/verify.d.ts",
32
47
  "import": "./dist/verify.js",