@warmhub/sdk-ts 0.63.0 → 0.65.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.
@@ -7223,6 +7223,10 @@ function normalizeOptionalTypeSpec(spec) {
7223
7223
  }
7224
7224
  return { spec, optionalByType: false };
7225
7225
  }
7226
+ function isFieldOptional(fieldKey, typeSpec) {
7227
+ const optionalByKey = fieldKey !== void 0 && fieldKey.endsWith("?");
7228
+ return optionalByKey || normalizeOptionalTypeSpec(typeSpec).optionalByType;
7229
+ }
7226
7230
 
7227
7231
  // ../rules/src/shape-validation-runtime.ts
7228
7232
  function validateAgainstShape(data, shapeFields) {
@@ -7340,13 +7344,12 @@ function nestedObjectFields(typeDef) {
7340
7344
  }
7341
7345
  function compileObjectFields(shapeFields) {
7342
7346
  return Object.entries(shapeFields).map(([fieldSpec, rawTypeDef]) => {
7343
- const isOptionalByKey = fieldSpec.endsWith("?");
7344
- const fieldName = isOptionalByKey ? fieldSpec.slice(0, -1) : fieldSpec;
7347
+ const fieldName = fieldSpec.endsWith("?") ? fieldSpec.slice(0, -1) : fieldSpec;
7345
7348
  const normalized = normalizeOptionalTypeSpec(rawTypeDef);
7346
7349
  return {
7347
7350
  fieldName,
7348
7351
  displayName: escapeFieldNameForDisplay(fieldName),
7349
- isOptional: isOptionalByKey || normalized.optionalByType,
7352
+ isOptional: isFieldOptional(fieldSpec, rawTypeDef),
7350
7353
  validate: compileTypeValidator(normalized.spec)
7351
7354
  };
7352
7355
  });
@@ -9338,7 +9341,7 @@ function validateWarmHubClientOptions(options) {
9338
9341
  throw new TypeError(`Unknown WarmHubClient option "${key}"${hint}`);
9339
9342
  }
9340
9343
  }
9341
- var SDK_VERSION = "0.63.0" ;
9344
+ var SDK_VERSION = "0.65.0" ;
9342
9345
  var DEFAULT_API_URL = "https://api.warmhub.ai";
9343
9346
  var UNBATCHED_TRPC_PATHS = /* @__PURE__ */ new Set([
9344
9347
  "repo.shapeInstanceCounts",
@@ -9936,6 +9939,23 @@ var WarmHubClient = class _WarmHubClient {
9936
9939
  throw toWarmHubError(error);
9937
9940
  }
9938
9941
  },
9942
+ /**
9943
+ * Install lifecycle timeline from the durable install-events log (GH-4690).
9944
+ * Omit `componentRef` for the repo-wide activity feed; pass `Org/Name` for a
9945
+ * single component's history.
9946
+ */
9947
+ history: async (orgName, repoName, opts) => {
9948
+ try {
9949
+ return await this.trpc.component.history.query({
9950
+ orgName,
9951
+ repoName,
9952
+ componentRef: opts?.componentRef,
9953
+ limit: opts?.limit
9954
+ });
9955
+ } catch (error) {
9956
+ throw toWarmHubError(error);
9957
+ }
9958
+ },
9939
9959
  /**
9940
9960
  * Install a registered component into a repository (GH-4610).
9941
9961
  *
@@ -12610,5 +12630,5 @@ re2js/build/index.js:
12610
12630
  */
12611
12631
 
12612
12632
  export { AllStreamOperationsFailedError, CLI_INSTALL_REPO_HEADER, CLI_SIGNATURE_HEADER, CLI_TIMESTAMP_HEADER, CONTENT_FIELD_LIMIT_ERROR, CliCallVerificationError, DEFAULT_API_URL, DEFAULT_STREAM_CHUNK_SIZE, MAX_CONTENT_FIELD_BYTES, MAX_STREAM_APPEND_OPERATION_COUNT2 as MAX_STREAM_APPEND_OPERATION_COUNT, OperationBuilder, PartialStreamSubmissionError, SDK_VERSION, WarmHubClient, WarmHubError, connectionErrorMessage, contentFieldLimitError, countStreamAppendResultStatuses, isConnectionError, isRetryable, isWarmHubError, normalizeWref, resolveFunctionLogMode, sanitizeErrorMessage, sdkVersionIsBelowMinimum, streamAppendResultStatus, submitOperationsViaStream, toWarmHubError, validateAgainstShape, verifyCliCall };
12613
- //# sourceMappingURL=chunk-JPX7ZWWE.js.map
12614
- //# sourceMappingURL=chunk-JPX7ZWWE.js.map
12633
+ //# sourceMappingURL=chunk-C2Q4D3JM.js.map
12634
+ //# sourceMappingURL=chunk-C2Q4D3JM.js.map