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 applications response types #956

Merged
merged 4 commits into from
Sep 9, 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
8 changes: 8 additions & 0 deletions packages/applications/lib/types/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export type Application = {
*
*/
publicKey?: string;
/**
* The private key for the application.
*
* @remarks
* This will only be present when the application is created, or when you cycle the public key when doing an update.
*
*/
privateKey?: string;
};

/**
Expand Down
21 changes: 10 additions & 11 deletions packages/applications/lib/types/CapabilityVoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export type EventCallbackUrl = {
connectTimeout?: number;
} & CapabilityWebhook;


/**
* The fallback answer url can optionally be configured. This is used when
* answer url is offline or returning an HTTP error code.
Expand Down Expand Up @@ -63,42 +62,42 @@ export type CapabilityVoice = {
/**
* Webhook configuration for voice events.
*/
webhooks: {
webhooks?: {
/**
* Webhook for events related to voice calls.
*/
eventUrl: EventCallbackUrl
eventUrl?: EventCallbackUrl;

/**
* Webhook for voice call answer events.
*/
answerUrl: AnswerCallbackUrl
answerUrl?: AnswerCallbackUrl;

/**
* Webhook for fallback voice call answer events.
*/
fallbackAnswerUrl: FallbackAnswerUrl
fallbackAnswerUrl?: FallbackAnswerUrl;
};

/**
* Indicates whether payment is enabled.
*/
paymentEnabled: boolean;
paymentEnabled?: boolean;

/**
* Whether to use signed webhooks for voice events.
*
* @remarks Refer to {@link https://developer.vonage.com/en/getting-started/concepts/webhooks#decoding-signed-webhooks} for more information.
*/
signedCallbacks: boolean;
signedCallbacks?: boolean;

/**
* Conversation TTL
*
* @remarks The length of time named conversations will remain active for after
* creation, in hours. 0 means infinite. Maximum value is 744 (i.e., 31 days).
*/
conversationsTTL: number;
conversationsTTL?: number;

/**
* Region to round calls
Expand All @@ -109,15 +108,15 @@ export type CapabilityVoice = {
* regional endpoint. If the call is using a regional endpoint, this will
* override the application setting.
*/
region: VoiceRegions | string;
region?: VoiceRegions | string;

/**
* Payment gateway configuration.
*/
payments: {
payments?: {
/**
* List of payment gateways.
*/
gateways: Array<unknown>;
gateways?: Array<unknown>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export type ApplicationResponse = {
/**
* The public key for the application.
*/
public_key?: string | undefined
public_key?: string | undefined;
/**
* The private key for the application.
*/
private_key?: string | undefined;
};
/**
* Privacy configuration for the application.
Expand All @@ -43,7 +47,6 @@ export type ApplicationResponse = {
* Capabilities configuration for the application.
*/
capabilities: {

/**
* RTC/Conversation Service related configuration.
*/
Expand Down Expand Up @@ -79,7 +82,5 @@ export type ApplicationResponse = {
* programmability service applications. This is always an empty object.
*/
vbc: unknown;

};

} & Application & APILinks;
Loading