@chronary/sdk 0.8.1 → 0.9.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.
package/dist/index.d.cts CHANGED
@@ -356,7 +356,7 @@ interface CreateEventParams {
356
356
  * RFC 5545 RRULE subset (no "RRULE:" prefix), e.g. "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=12" —
357
357
  * makes the event a recurring series master. Not allowed with status='hold'.
358
358
  * Fails with 400 on an invalid rule; 429 when the plan's active
359
- * recurring-series cap is reached (free: 5, Pro: 250 — see
359
+ * recurring-series cap is reached (free: 1, Pro: 250 — see
360
360
  * `usage.recurring_events`); 403 plan_required when the series is unbounded
361
361
  * or ends more than 90 days out on the free plan (Pro allows unbounded).
362
362
  */
@@ -378,7 +378,7 @@ interface UpdateEventParams {
378
378
  * "RRULE:" prefix). null clears the rule, turning the series back into a
379
379
  * one-off event. Fails with 400 on an invalid rule; 429 when converting a
380
380
  * one-off to recurring and the plan's active recurring-series cap is
381
- * reached (free: 5, Pro: 250); 403 plan_required when the series is
381
+ * reached (free: 1, Pro: 250); 403 plan_required when the series is
382
382
  * unbounded or ends more than 90 days out on the free plan (Pro allows
383
383
  * unbounded).
384
384
  */
@@ -893,7 +893,7 @@ interface Usage {
893
893
  availability_queries: UsageMetric;
894
894
  ical_subscriptions: UsageMetric;
895
895
  proposals: UsageMetric;
896
- /** Active recurring series masters vs. the plan cap (free: 5, Pro: 250; null = unlimited). */
896
+ /** Active recurring series masters vs. the plan cap (free: 1, Pro: 250; null = unlimited). */
897
897
  recurring_events: UsageMetric;
898
898
  /** Active booking pages vs. the plan cap (free: 1, Pro: 25; null = unlimited). */
899
899
  booking_pages: UsageMetric;
@@ -1796,7 +1796,7 @@ declare class BillingClient {
1796
1796
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1797
1797
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1798
1798
 
1799
- declare const VERSION = "0.8.1";
1799
+ declare const VERSION = "0.9.0";
1800
1800
 
1801
1801
  declare class ChronaryError extends Error {
1802
1802
  readonly status: number;
package/dist/index.d.ts CHANGED
@@ -356,7 +356,7 @@ interface CreateEventParams {
356
356
  * RFC 5545 RRULE subset (no "RRULE:" prefix), e.g. "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=12" —
357
357
  * makes the event a recurring series master. Not allowed with status='hold'.
358
358
  * Fails with 400 on an invalid rule; 429 when the plan's active
359
- * recurring-series cap is reached (free: 5, Pro: 250 — see
359
+ * recurring-series cap is reached (free: 1, Pro: 250 — see
360
360
  * `usage.recurring_events`); 403 plan_required when the series is unbounded
361
361
  * or ends more than 90 days out on the free plan (Pro allows unbounded).
362
362
  */
@@ -378,7 +378,7 @@ interface UpdateEventParams {
378
378
  * "RRULE:" prefix). null clears the rule, turning the series back into a
379
379
  * one-off event. Fails with 400 on an invalid rule; 429 when converting a
380
380
  * one-off to recurring and the plan's active recurring-series cap is
381
- * reached (free: 5, Pro: 250); 403 plan_required when the series is
381
+ * reached (free: 1, Pro: 250); 403 plan_required when the series is
382
382
  * unbounded or ends more than 90 days out on the free plan (Pro allows
383
383
  * unbounded).
384
384
  */
@@ -893,7 +893,7 @@ interface Usage {
893
893
  availability_queries: UsageMetric;
894
894
  ical_subscriptions: UsageMetric;
895
895
  proposals: UsageMetric;
896
- /** Active recurring series masters vs. the plan cap (free: 5, Pro: 250; null = unlimited). */
896
+ /** Active recurring series masters vs. the plan cap (free: 1, Pro: 250; null = unlimited). */
897
897
  recurring_events: UsageMetric;
898
898
  /** Active booking pages vs. the plan cap (free: 1, Pro: 25; null = unlimited). */
899
899
  booking_pages: UsageMetric;
@@ -1796,7 +1796,7 @@ declare class BillingClient {
1796
1796
  declare function verifySignature(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<void>;
1797
1797
  declare function constructEvent(rawBody: string, headers: Headers | Record<string, string>, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
1798
1798
 
1799
- declare const VERSION = "0.8.1";
1799
+ declare const VERSION = "0.9.0";
1800
1800
 
1801
1801
  declare class ChronaryError extends Error {
1802
1802
  readonly status: number;
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var VERSION = "0.8.1";
2
+ var VERSION = "0.9.0";
3
3
 
4
4
  // src/error.ts
5
5
  function str(body, key) {
@@ -283,11 +283,12 @@ var CoreClient = class {
283
283
  const data = await response.json();
284
284
  return { data, rawResponse };
285
285
  }
286
- if (RETRYABLE_STATUS_CODES.has(response.status) && attempt < this.maxRetries) {
287
- lastError = await this.buildError(response, requestId);
286
+ const error = await this.buildError(response, requestId);
287
+ if (RETRYABLE_STATUS_CODES.has(response.status) && attempt < this.maxRetries && !(error instanceof QuotaExceededError)) {
288
+ lastError = error;
288
289
  continue;
289
290
  }
290
- throw await this.buildError(response, requestId);
291
+ throw error;
291
292
  } catch (err) {
292
293
  clearTimeout(timeoutId);
293
294
  options?.signal?.removeEventListener("abort", abortFromCaller);