PaddleHQ / paddle-node-sdk

Node.js SDK for working with the Paddle API in server-side apps.
https://developer.paddle.com/
Apache License 2.0
28 stars 5 forks source link

[Feature]: Expose hasMore and add estimatedTotal to Collection #14

Closed mw10013 closed 3 months ago

mw10013 commented 4 months ago

Tell us about your feature request

Expose hasMore and add estimatedTotal to Collection to align with pagination (https://developer.paddle.com/api-reference/about/pagination).

https://github.com/PaddleHQ/paddle-node-sdk/blob/2fb1bb5b09cfcee2c902081cb444d5acd166b45d/src/internal/base/collection.ts#L5-L8

What problem are you looking to solve?

Facilitate pagination in application.

Additional context

No response

How important is this suggestion to you?

Nice to have

vijayasingam-paddle commented 4 months ago

Hi @mw10013, Thank you for your feedback.

We made a conscious design decision to abstract the internal workings of pagination and not to expose them for general usage.

With that said, I agree that there could be some benefits of exposing these properties. We will come up with a scalable solution that follows our design philosophy and makes it easy to use.