recal-sdk 0.2.8 → 0.2.9

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.
Files changed (2) hide show
  1. package/README.md +27 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -273,7 +273,7 @@ await recal.calendar.deleteEventByMetaId(
273
273
 
274
274
  ```typescript
275
275
  // Find available time slots (minimal config)
276
- const availability = await recal.scheduling.userSchedulingBasic(
276
+ const availability = await recal.scheduling.user(
277
277
  'user_id',
278
278
  new Date('2024-01-15'),
279
279
  new Date('2024-01-20'),
@@ -283,7 +283,7 @@ const availability = await recal.scheduling.userSchedulingBasic(
283
283
  )
284
284
 
285
285
  // Or with more options
286
- const availabilityDetailed = await recal.scheduling.userSchedulingBasic(
286
+ const availabilityDetailed = await recal.scheduling.user(
287
287
  'user_id',
288
288
  new Date('2024-01-15'),
289
289
  new Date('2024-01-20'),
@@ -298,6 +298,26 @@ const availabilityDetailed = await recal.scheduling.userSchedulingBasic(
298
298
  )
299
299
  ```
300
300
 
301
+ #### Allow Overlapping Events
302
+
303
+ ```typescript
304
+ // Find availability even when user already has events scheduled
305
+ const availabilityWithOverlaps = await recal.scheduling.user(
306
+ 'user_id',
307
+ new Date('2024-01-15'),
308
+ new Date('2024-01-20'),
309
+ {
310
+ slotDuration: 30,
311
+ maxOverlaps: 2, // Allow up to 2 overlapping events per slot
312
+ timeZone: 'America/New_York'
313
+ }
314
+ )
315
+
316
+ // maxOverlaps: 2, means 1 slot is still available even if the user has 2 existing events at the same time.
317
+ // This enables booking a n concurrent events - useful for optional meetings,
318
+ // tentative invites, or users who can handle multiple events simultaneous, like a team that has just one calendar.
319
+ ```
320
+
301
321
  #### Get User Availability (Advanced)
302
322
 
303
323
  ```typescript
@@ -312,7 +332,7 @@ const schedules = [
312
332
  ]
313
333
 
314
334
  // Minimal config
315
- const availability = await recal.scheduling.userSchedulingAdvanced(
335
+ const availability = await recal.scheduling.userAdvanced(
316
336
  'user_id',
317
337
  schedules,
318
338
  new Date('2024-01-15'),
@@ -321,7 +341,7 @@ const availability = await recal.scheduling.userSchedulingAdvanced(
321
341
  )
322
342
 
323
343
  // Or with more options
324
- const availabilityDetailed = await recal.scheduling.userSchedulingAdvanced(
344
+ const availabilityDetailed = await recal.scheduling.userAdvanced(
325
345
  'user_id',
326
346
  schedules,
327
347
  new Date('2024-01-15'),
@@ -339,7 +359,7 @@ const availabilityDetailed = await recal.scheduling.userSchedulingAdvanced(
339
359
 
340
360
  ```typescript
341
361
  // Find organization-wide available time slots (minimal)
342
- const orgAvailability = await recal.scheduling.getOrgWideAvailability(
362
+ const orgAvailability = await recal.scheduling.organization(
343
363
  'org-slug',
344
364
  new Date('2024-01-15'),
345
365
  new Date('2024-01-20'),
@@ -347,7 +367,7 @@ const orgAvailability = await recal.scheduling.getOrgWideAvailability(
347
367
  )
348
368
 
349
369
  // Or with constraints
350
- const orgAvailabilityConstrained = await recal.scheduling.getOrgWideAvailability(
370
+ const orgAvailabilityConstrained = await recal.scheduling.organization(
351
371
  'org-slug',
352
372
  new Date('2024-01-15'),
353
373
  new Date('2024-01-20'),
@@ -678,7 +698,7 @@ const recal = new RecalClient({
678
698
 
679
699
  ```typescript
680
700
  // 1. Check availability
681
- const availability = await recal.scheduling.userSchedulingBasic(
701
+ const availability = await recal.scheduling.user(
682
702
  'consultant_id',
683
703
  new Date(),
684
704
  new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // Next 7 days
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recal-sdk",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Recal SDK",
5
5
  "author": "Recal <team@recal.dev>",
6
6
  "contributors": ["tkoehlerlg", "jschwxrz"],