Skip to content

Add Capacity API methods: showBookingGrid and getActivityBookingOptions#65

Merged
miquelgall merged 2 commits intomainfrom
64-add-capacity-api-methods-showbookinggrid-and-getactivitybookingoptions
Feb 3, 2026
Merged

Add Capacity API methods: showBookingGrid and getActivityBookingOptions#65
miquelgall merged 2 commits intomainfrom
64-add-capacity-api-methods-showbookinggrid-and-getactivitybookingoptions

Conversation

@miquelgall
Copy link
Contributor

Summary

  • Add showBookingGrid method (POST /rest/ofscCapacity/v1/showBookingGrid)
    • Retrieves time slots in which an activity can be performed
    • Supports activity identification, date ranges, and various options
  • Add getActivityBookingOptions method (GET /rest/ofscCapacity/v1/activityBookingOptions)
    • Retrieves available booking options for an activity type on specific dates
    • Supports all documented parameters with proper defaults
    • Allows arbitrary key-value pairs for custom parameters
  • Add TypeScript interfaces for request/response types
  • Enhance test_credentials.ts to support credentials file fallback
  • Fix Get Activity Link Type test to use correct response fields

Test plan

  • All 79 tests pass (2 skipped)
  • New capacity tests (7 tests) verify both API methods
  • Build compiles successfully

Resolves #64

- Add showBookingGrid method (POST /rest/ofscCapacity/v1/showBookingGrid)
  - Retrieves time slots in which an activity can be performed
  - Supports activity identification, date ranges, and various options

- Add getActivityBookingOptions method (GET /rest/ofscCapacity/v1/activityBookingOptions)
  - Retrieves available booking options for an activity type on specific dates
  - Supports all documented parameters with proper defaults
  - Allows arbitrary key-value pairs for custom parameters

- Add TypeScript interfaces for request/response types
  - OFSShowBookingGridParams, OFSShowBookingGridResponse
  - OFSGetActivityBookingOptionsParams, OFSGetActivityBookingOptionsResponse

- Enhance test_credentials.ts to support credentials file fallback
  - Falls back to test/credentials_test.json when env vars not set

- Fix Get Activity Link Type test
  - Use toActivityId and linkType from linked activities response

- Add comprehensive test suite for Capacity API methods

Resolves #64
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 25, 2025
@miquelgall miquelgall requested a review from btoron February 3, 2026 17:52
@miquelgall miquelgall merged commit 98e0f10 into main Feb 3, 2026
2 of 3 checks passed
@miquelgall miquelgall deleted the 64-add-capacity-api-methods-showbookinggrid-and-getactivitybookingoptions branch February 3, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Capacity API methods: showBookingGrid and getActivityBookingOptions

2 participants