@sylphx/sdk 0.3.3 → 0.3.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.
@@ -735,7 +735,7 @@ interface SylphxConfig {
735
735
  */
736
736
  readonly secretKey?: string;
737
737
  /**
738
- * Project ref — short 16-char alphanumeric nanoid (e.g. "abc123def456ghij").
738
+ * Project ref — short 12-char lowercase alphanumeric string (e.g. "abc123def456").
739
739
  *
740
740
  * The SDK targets: https://{ref}.api.sylphx.com/v1
741
741
  *
@@ -5337,7 +5337,7 @@ interface components {
5337
5337
  OrgInvitation: {
5338
5338
  /**
5339
5339
  * @description Invitation ID
5340
- * @example ivt_3Zb83qVQxkHMJPZ8VrJfQ2
5340
+ * @example inv_3Zb83qVQxkHMJPZ8VrJfQ2
5341
5341
  */
5342
5342
  id: string
5343
5343
  /**
@@ -5407,7 +5407,7 @@ interface components {
5407
5407
  /**
5408
5408
  * Format: uuid
5409
5409
  * @description Invitation token (ID)
5410
- * @example ivt_3Zb83qVQxkHMJPZ8VrJfQ2
5410
+ * @example inv_3Zb83qVQxkHMJPZ8VrJfQ2
5411
5411
  */
5412
5412
  token: string
5413
5413
  }
@@ -735,7 +735,7 @@ interface SylphxConfig {
735
735
  */
736
736
  readonly secretKey?: string;
737
737
  /**
738
- * Project ref — short 16-char alphanumeric nanoid (e.g. "abc123def456ghij").
738
+ * Project ref — short 12-char lowercase alphanumeric string (e.g. "abc123def456").
739
739
  *
740
740
  * The SDK targets: https://{ref}.api.sylphx.com/v1
741
741
  *
@@ -5337,7 +5337,7 @@ interface components {
5337
5337
  OrgInvitation: {
5338
5338
  /**
5339
5339
  * @description Invitation ID
5340
- * @example ivt_3Zb83qVQxkHMJPZ8VrJfQ2
5340
+ * @example inv_3Zb83qVQxkHMJPZ8VrJfQ2
5341
5341
  */
5342
5342
  id: string
5343
5343
  /**
@@ -5407,7 +5407,7 @@ interface components {
5407
5407
  /**
5408
5408
  * Format: uuid
5409
5409
  * @description Invitation token (ID)
5410
- * @example ivt_3Zb83qVQxkHMJPZ8VrJfQ2
5410
+ * @example inv_3Zb83qVQxkHMJPZ8VrJfQ2
5411
5411
  */
5412
5412
  token: string
5413
5413
  }
@@ -43519,7 +43519,7 @@ function httpStatusToErrorCode(status) {
43519
43519
  return status >= 500 ? "INTERNAL_SERVER_ERROR" : "BAD_REQUEST";
43520
43520
  }
43521
43521
  }
43522
- var REF_PATTERN = /^[a-z0-9]{16}$/;
43522
+ var REF_PATTERN = /^[a-z0-9]{12}$/;
43523
43523
  function createConfig(input) {
43524
43524
  let secretKey;
43525
43525
  if (input.secretKey) {
@@ -43538,7 +43538,7 @@ function createConfig(input) {
43538
43538
  const trimmedRef = input.ref.trim();
43539
43539
  if (!REF_PATTERN.test(trimmedRef)) {
43540
43540
  throw new SylphxError(
43541
- `[Sylphx] Invalid project ref format: "${input.ref}". Expected a 16-character lowercase alphanumeric string (e.g. "abc123def456ghij"). Get your ref from Platform Console \u2192 Projects \u2192 Your Project \u2192 Overview.`,
43541
+ `[Sylphx] Invalid project ref format: "${input.ref}". Expected a 12-character lowercase alphanumeric string (e.g. "abc123def456"). Get your ref from Platform Console \u2192 Projects \u2192 Your Project \u2192 Overview.`,
43542
43542
  { code: "BAD_REQUEST" }
43543
43543
  );
43544
43544
  }