@pymthouse/builder-sdk 0.4.1 → 0.4.2-rc.1

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.
@@ -102,6 +102,7 @@ declare class PmtHouseClient {
102
102
  startDate: string;
103
103
  endDate: string;
104
104
  maxEndUserIds?: number;
105
+ includeRetail?: boolean;
105
106
  }): Promise<MeScopeUsagePayload>;
106
107
  getAppManifest(opts?: {
107
108
  ifNoneMatch?: string;
@@ -102,6 +102,7 @@ declare class PmtHouseClient {
102
102
  startDate: string;
103
103
  endDate: string;
104
104
  maxEndUserIds?: number;
105
+ includeRetail?: boolean;
105
106
  }): Promise<MeScopeUsagePayload>;
106
107
  getAppManifest(opts?: {
107
108
  ifNoneMatch?: string;
package/dist/env.cjs CHANGED
@@ -293,11 +293,10 @@ function parseMintUserSignerTokenResponse(body, ttlRefreshRatio = DEFAULT_TTL_RE
293
293
  lifetimeGrantedUsdMicros
294
294
  };
295
295
  }
296
- var LIVEPEER_REMOTE_SIGNER_AUDIENCE, DEFAULT_TTL_REFRESH_RATIO, TOKEN_RESPONSE_ERROR;
296
+ var DEFAULT_TTL_REFRESH_RATIO, TOKEN_RESPONSE_ERROR;
297
297
  var init_mint_token = __esm({
298
298
  "src/signer/mint-token.ts"() {
299
299
  init_json_fields();
300
- LIVEPEER_REMOTE_SIGNER_AUDIENCE = "livepeer-remote-signer";
301
300
  DEFAULT_TTL_REFRESH_RATIO = 0.8;
302
301
  TOKEN_RESPONSE_ERROR = "invalid_token_response";
303
302
  }
@@ -364,7 +363,7 @@ async function mintSignerTokenFromDeviceToken(options) {
364
363
  code: "oidc_discovery_invalid"
365
364
  });
366
365
  }
367
- const audience = options.audience?.trim() || LIVEPEER_REMOTE_SIGNER_AUDIENCE;
366
+ const audience = options.audience?.trim() || issuerUrl;
368
367
  const params = new URLSearchParams({
369
368
  grant_type: TOKEN_EXCHANGE_GRANT,
370
369
  subject_token: options.deviceToken,
@@ -1385,7 +1384,8 @@ var PmtHouseClient = class {
1385
1384
  const usageByUser = await this.getUsage({
1386
1385
  startDate: input.startDate,
1387
1386
  endDate: input.endDate,
1388
- groupBy: "user"
1387
+ groupBy: "user",
1388
+ includeRetail: input.includeRetail
1389
1389
  });
1390
1390
  const userIds = getEndUserIdsForExternalUser(usageByUser, input.externalUserId);
1391
1391
  const cap = input.maxEndUserIds ?? DEFAULT_MAX_END_USER_IDS;
@@ -1396,7 +1396,8 @@ var PmtHouseClient = class {
1396
1396
  startDate: input.startDate,
1397
1397
  endDate: input.endDate,
1398
1398
  groupBy: "pipeline_model",
1399
- userId
1399
+ userId,
1400
+ includeRetail: input.includeRetail
1400
1401
  })
1401
1402
  )
1402
1403
  );