Skip to content

Commit

Permalink
Merge pull request #50 from replicatedhq/divolgin/sc-100946/integrati…
Browse files Browse the repository at this point in the history
…on-mode-is-messy-for-the-sdk-developer

Allow specifying dev mode when creating customers
  • Loading branch information
divolgin authored Jan 3, 2025
2 parents 30d4e26 + 427799f commit dc91262
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/customers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class KubernetesDistribution {
isAirgap: boolean;
}

export async function createCustomer(vendorPortalApi: VendorPortalApi, appSlug: string, name: string, email: string, licenseType: string, channelSlug: string, expiresIn: number, entitlementValues?: entitlementValue[], isKotsInstallEnabled?: boolean): Promise<Customer> {
export async function createCustomer(vendorPortalApi: VendorPortalApi, appSlug: string, name: string, email: string, licenseType: string, channelSlug: string, expiresIn: number, entitlementValues?: entitlementValue[], isKotsInstallEnabled?: boolean, isDevModeEnabled?: boolean): Promise<Customer> {
try {
const app = await getApplicationDetails(vendorPortalApi, appSlug);

Expand Down Expand Up @@ -59,6 +59,9 @@ export async function createCustomer(vendorPortalApi: VendorPortalApi, appSlug:
if (entitlementValues) {
createCustomerReqBody["entitlementValues"] = entitlementValues;
}
if (isDevModeEnabled !== undefined) {
createCustomerReqBody["is_dev_mode_enabled"] = isDevModeEnabled;
}

const createCustomerRes = await http.post(createCustomerUri, JSON.stringify(createCustomerReqBody));
if (createCustomerRes.message.statusCode != 201) {
Expand Down

0 comments on commit dc91262

Please sign in to comment.