Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
feat: product type for offering build request, filter interface (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
rostyk-kanafotskyy authored Feb 19, 2024
1 parent 388d340 commit 5da6acd
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/types/subscription-offerings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,27 @@ export interface SubscriptionOfferingBase {
}
}

export interface SubscriptionOfferingBuildProduct {
external_ref?: string
name: string
description?: string
sku?: string
main_image?: string
price?: {
[key: string]: {
amount: number
includes_tax?: boolean
}
}
price_units?: {
unit: "day" | "month"
amount: number
}
}
export interface SubscriptionOfferingBuildBody {
name: string
description: string
products: string[]
products: string[] | SubscriptionOfferingBuildProduct[]
plans: string[]
}

Expand Down Expand Up @@ -69,6 +86,12 @@ type SubscriptionOfferingAttachmentsRelationships = {
}
}

export interface SubscriptionOfferingFilter {
eq?: {
"products.external_ref": string
}
}

export type SubscriptionOfferingPlan = SubscriptionPlan & SubscriptionOfferingAttachmentsRelationships
export type SubscriptionOfferingProduct = SubscriptionProduct & SubscriptionOfferingAttachmentsRelationships
/**
Expand All @@ -80,7 +103,7 @@ export interface SubscriptionOfferingsEndpoint
SubscriptionOffering,
SubscriptionOfferingCreate,
SubscriptionOfferingUpdate,
never,
SubscriptionOfferingFilter,
never,
never
> {
Expand Down

0 comments on commit 5da6acd

Please sign in to comment.