Skip to content

Commit

Permalink
fix applications response types (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-lukashenka-micoworks authored Sep 9, 2024
1 parent 96450dd commit 7eda9db
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
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;

0 comments on commit 7eda9db

Please sign in to comment.