Skip to content

Feat/add schedules#3

Merged
IamKirbki merged 3 commits intomainfrom
feat/add-schedules
Mar 26, 2026
Merged

Feat/add schedules#3
IamKirbki merged 3 commits intomainfrom
feat/add-schedules

Conversation

@IamKirbki
Copy link
Copy Markdown
Contributor

@IamKirbki IamKirbki commented Mar 25, 2026

Add Scheduled Tasks Endpoints

Summary

  • Added new scheduled endpoints for users and organizations
  • Refactored resources into organized folder structure
  • Changed API to nest schedule under user/organization

New API Structure

lunogram.user.upsert()
lunogram.user.delete()
lunogram.user.postEvents()
lunogram.user.schedule.create()
lunogram.user.schedule.delete()

lunogram.organization.upsert()
lunogram.organization.delete()
lunogram.organization.addUser()
lunogram.organization.removeUser()
lunogram.organization.postEvents()
lunogram.organization.schedule.create()
lunogram.organization.schedule.delete()

New Types

  • CreateUserScheduledRequest / CreateOrganizationScheduledRequest
  • DeleteUserScheduledRequest / DeleteOrganizationScheduledRequest
  • UserScheduledResponse / OrganizationScheduledResponse

Structure Changes

  • Restructured src/core/resources/ into users/ and organizations/ subdirectories
  • Added src/types/scheduled.ts for scheduled-related types
  • UserScheduledResource and OrganizationScheduledResource kept in separate files

@jeroenrinzema
Copy link
Copy Markdown
Contributor

I like this but would propose to structure the sdk a bit differently:

lunogram.user.post()
lunogram.user.schedule.post()
lunogram.organization.schedule.post()

@IamKirbki IamKirbki merged commit f050442 into main Mar 26, 2026
1 check passed
@IamKirbki IamKirbki deleted the feat/add-schedules branch March 26, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants