@ophelio/sdk 0.6.0 → 0.6.1
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.cjs +5 -1
- package/dist/index.d.cts +7 -2
- package/dist/index.d.mts +7 -2
- package/dist/index.mjs +5 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1021,13 +1021,17 @@ var MembershipsResource = class extends APIResource {
|
|
|
1021
1021
|
options
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
+
/**
|
|
1025
|
+
* Lists scheduled changes. `status` accepts one status, several, or `all`;
|
|
1026
|
+
* omit it to return every status.
|
|
1027
|
+
*/
|
|
1024
1028
|
async listScheduledChanges(id, params, options) {
|
|
1025
1029
|
const response = await this.transport.request({
|
|
1026
1030
|
method: "GET",
|
|
1027
1031
|
path: `/api/v1/memberships/${encodeURIComponent(id)}/scheduled-changes`,
|
|
1028
1032
|
query: {
|
|
1029
1033
|
...pageQuery(params),
|
|
1030
|
-
...params?.status ? { status: params.status } : {}
|
|
1034
|
+
...params?.status !== void 0 ? { status: params.status } : {}
|
|
1031
1035
|
},
|
|
1032
1036
|
retryable: true,
|
|
1033
1037
|
options
|
package/dist/index.d.cts
CHANGED
|
@@ -5859,6 +5859,7 @@ type BillingOptionSalesChannel = Schemas['BillingOptionSalesChannel'];
|
|
|
5859
5859
|
type WebhookSubscription = Schemas['WebhookSubscription'];
|
|
5860
5860
|
type WebhookDelivery = Schemas['WebhookDelivery'];
|
|
5861
5861
|
type ScheduledChange = Schemas['MembershipScheduledChangeResponseDto'];
|
|
5862
|
+
type ScheduledChangeStatus = ScheduledChange['status'];
|
|
5862
5863
|
type PlanChangeResult = Schemas['PlanChangeResponseDto'];
|
|
5863
5864
|
type MemberSyncResponse = Schemas['MemberSyncResponse'];
|
|
5864
5865
|
type RedeemEntitlementResponse = Schemas['RedeemEntitlementResponseDto'];
|
|
@@ -6200,8 +6201,12 @@ declare class MembershipsResource extends APIResource {
|
|
|
6200
6201
|
upgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
6201
6202
|
/** Mirror of upgrade towards a linked lower plan. */
|
|
6202
6203
|
downgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
6204
|
+
/**
|
|
6205
|
+
* Lists scheduled changes. `status` accepts one status, several, or `all`;
|
|
6206
|
+
* omit it to return every status.
|
|
6207
|
+
*/
|
|
6203
6208
|
listScheduledChanges(id: string, params?: PageParams & {
|
|
6204
|
-
status?: 'all'
|
|
6209
|
+
status?: 'all' | ScheduledChangeStatus | Array<'all' | ScheduledChangeStatus>;
|
|
6205
6210
|
}, options?: RequestOptions): Promise<Page<ScheduledChange>>;
|
|
6206
6211
|
cancelScheduledChange(id: string, changeId: string, options?: RequestOptions): Promise<void>;
|
|
6207
6212
|
listTermTransactions(id: string, termId: string, params?: PageParams, options?: RequestOptions): Promise<Page<Transaction>>;
|
|
@@ -6479,4 +6484,4 @@ declare function paginate<T>(fetchPage: (params: PageParams) => Promise<Page<T>>
|
|
|
6479
6484
|
*/
|
|
6480
6485
|
declare function collect<T>(fetchPage: (params: PageParams) => Promise<Page<T>>, params?: PageParams): Promise<T[]>;
|
|
6481
6486
|
//#endregion
|
|
6482
|
-
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|
|
6487
|
+
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, ScheduledChangeStatus, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|
package/dist/index.d.mts
CHANGED
|
@@ -5859,6 +5859,7 @@ type BillingOptionSalesChannel = Schemas['BillingOptionSalesChannel'];
|
|
|
5859
5859
|
type WebhookSubscription = Schemas['WebhookSubscription'];
|
|
5860
5860
|
type WebhookDelivery = Schemas['WebhookDelivery'];
|
|
5861
5861
|
type ScheduledChange = Schemas['MembershipScheduledChangeResponseDto'];
|
|
5862
|
+
type ScheduledChangeStatus = ScheduledChange['status'];
|
|
5862
5863
|
type PlanChangeResult = Schemas['PlanChangeResponseDto'];
|
|
5863
5864
|
type MemberSyncResponse = Schemas['MemberSyncResponse'];
|
|
5864
5865
|
type RedeemEntitlementResponse = Schemas['RedeemEntitlementResponseDto'];
|
|
@@ -6200,8 +6201,12 @@ declare class MembershipsResource extends APIResource {
|
|
|
6200
6201
|
upgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
6201
6202
|
/** Mirror of upgrade towards a linked lower plan. */
|
|
6202
6203
|
downgrade(id: string, params: PlanChangeParams, options?: RequestOptions): Promise<PlanChangeResult>;
|
|
6204
|
+
/**
|
|
6205
|
+
* Lists scheduled changes. `status` accepts one status, several, or `all`;
|
|
6206
|
+
* omit it to return every status.
|
|
6207
|
+
*/
|
|
6203
6208
|
listScheduledChanges(id: string, params?: PageParams & {
|
|
6204
|
-
status?: 'all'
|
|
6209
|
+
status?: 'all' | ScheduledChangeStatus | Array<'all' | ScheduledChangeStatus>;
|
|
6205
6210
|
}, options?: RequestOptions): Promise<Page<ScheduledChange>>;
|
|
6206
6211
|
cancelScheduledChange(id: string, changeId: string, options?: RequestOptions): Promise<void>;
|
|
6207
6212
|
listTermTransactions(id: string, termId: string, params?: PageParams, options?: RequestOptions): Promise<Page<Transaction>>;
|
|
@@ -6479,4 +6484,4 @@ declare function paginate<T>(fetchPage: (params: PageParams) => Promise<Page<T>>
|
|
|
6479
6484
|
*/
|
|
6480
6485
|
declare function collect<T>(fetchPage: (params: PageParams) => Promise<Page<T>>, params?: PageParams): Promise<T[]>;
|
|
6481
6486
|
//#endregion
|
|
6482
|
-
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|
|
6487
|
+
export { AddMemberParams, AdmitResult, AlreadyExistsError, BillingOption, BillingOptionSalesChannel, Calendar, CalendarRule, CalendarView, CancelMembershipParams, CreateBillingOptionParams, CreateBillingOptionSalesChannelParams, CreateCalendarParams, CreateCalendarRuleParams, CreateCustomerParams, CreateEntitlementParams, CreateMemberRoleParams, CreateMembershipParams, CreatePlanEntitlementAvailabilityParams, CreatePlanEntitlementParams, CreatePlanLinkParams, CreatePlanParams, CreatePlanPricingGroupMappingParams, CreatePricingGroupParams, CreateSalesChannelParams, CreateTargetCodeParams, CreateTransactionParams, CreateWebhookSubscriptionParams, Customer, CustomerMembershipSummary, CustomerView, DEFAULT_BASE_URL, Entitlement, EntitlementType, EntitlementUsage, type IdempotentRequestOptions, InternalError, InvalidArgumentError, Member, MemberEntitlement, MemberRole, MemberSyncResponse, Membership, MembershipTerm, NotFoundError, Ophelio, OphelioConnectionError, OphelioError, type OphelioOptions, OphelioTimeoutError, type OphelioWebhookEvent, Page, PageParams, PermissionDeniedError, Plan, PlanChangeParams, PlanChangeResult, PlanEntitlement, PlanEntitlementAvailability, PlanLink, PlanLinkView, PlanPricingGroupMapping, PricingGroup, RecordUsageParams, RedeemEntitlementParams, RedeemEntitlementResponse, ReissueCardParams, RenewMembershipParams, type RequestOptions, ResourceExhaustedError, SalesChannel, ScheduledChange, ScheduledChangeStatus, SyncMember, TargetCode, TargetCodeView, Transaction, UnauthenticatedError, UnavailableError, UnimplementedError, UpdateBillingOptionParams, UpdateCalendarParams, UpdateCalendarRuleParams, UpdateCustomerParams, UpdateEntitlementParams, UpdateMemberParams, UpdateMemberRoleParams, UpdateMembershipParams, UpdatePlanEntitlementAvailabilityParams, UpdatePlanEntitlementParams, UpdatePlanParams, UpdatePricingGroupParams, UpdateSalesChannelParams, UpdateTargetCodeParams, UpdateWebhookSubscriptionParams, WEBHOOK_EVENT_CODES, WebhookDelivery, type WebhookEventCode, WebhookSignatureVerificationError, WebhookSubscription, collect, type components, constructEvent, type operations, paginate, type paths, verifyWebhookSignature };
|
package/dist/index.mjs
CHANGED
|
@@ -1020,13 +1020,17 @@ var MembershipsResource = class extends APIResource {
|
|
|
1020
1020
|
options
|
|
1021
1021
|
});
|
|
1022
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* Lists scheduled changes. `status` accepts one status, several, or `all`;
|
|
1025
|
+
* omit it to return every status.
|
|
1026
|
+
*/
|
|
1023
1027
|
async listScheduledChanges(id, params, options) {
|
|
1024
1028
|
const response = await this.transport.request({
|
|
1025
1029
|
method: "GET",
|
|
1026
1030
|
path: `/api/v1/memberships/${encodeURIComponent(id)}/scheduled-changes`,
|
|
1027
1031
|
query: {
|
|
1028
1032
|
...pageQuery(params),
|
|
1029
|
-
...params?.status ? { status: params.status } : {}
|
|
1033
|
+
...params?.status !== void 0 ? { status: params.status } : {}
|
|
1030
1034
|
},
|
|
1031
1035
|
retryable: true,
|
|
1032
1036
|
options
|