Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(UA-9417): make daysToExpiry param optional + add response model #870

Merged
merged 3 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/resources/UsageAnalytics/Read/Snowflake/Snowflake.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ReadServiceResource from '../ReadServiceResource.js';
import {
GetCreditUsageParams,
ReactivateUserModel,
ReactivateUserParams,
SnowflakeCreditUsageModel,
SnowflakeNetworkPolicyModel,
Expand Down Expand Up @@ -63,7 +64,7 @@ export default class Snowflake extends ReadServiceResource {
* @param params The number of days until the user's expiration date.
*/
reactivateUser(snowflakeUser: string, params: ReactivateUserParams) {
return this.api.put<void>(
return this.api.put<ReactivateUserModel>(
this.buildPathWithOrg(`${Snowflake.baseUrl}/users/${snowflakeUser}/expiration`),
params,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@ export interface SnowflakeUserModel {
* The number of days that the user has access to the reader account.
* Ranging from 0 (indefinitely) to 90 days.
*/
daysToExpiry?: number;
daysToExpiry?: number | null;
}

export interface ReactivateUserParams {
daysToExpiry: number;
/**
* The number of days that the user has access to the reader account.
* Ranging from 0 (indefinitely) to 90 days.
*/
daysToExpiry?: number | null;
}

export interface ReactivateUserModel {
/**
* The username of the user.
*/
name: string;
/**
* The email of the user.
*/
email: string;
/**
* The number of days that the user has access to the reader account.
* Ranging from 0 (indefinitely) to 90 days.
*/
daysToExpiry?: number | null;
}

export interface SnowflakeNetworkPolicyModel {
Expand Down