Skip to content

Commit

Permalink
docs: added more JSDoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafał Pawłaszek committed Oct 24, 2023
1 parent ac2b636 commit 9d9b804
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 28 deletions.
97 changes: 77 additions & 20 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/eventbridge/destination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ import { ErrorHandlingConfiguration } from '../core/error-handling';
import { FlowType, IFlow } from '../core/flows';
import { IDestination } from '../core/vertices/destination';

/**
* The properties for the EventBridge destination
*/
export interface EventBridgeDestinationProps {
readonly partnerBus: string;
readonly errorHandling?: ErrorHandlingConfiguration;
}

/**
* This class represents AppFlow's EventBridge destination
*/
export class EventBridgeDestination implements IDestination {

private readonly compatibleFlows: FlowType[] = [FlowType.EVENT];
Expand Down
44 changes: 42 additions & 2 deletions src/googleanalytics4/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,48 @@ export interface GoogleAnalytics4ConnectorProfileProps extends ConnectorProfileP
readonly oAuth: GoogleAnalytics4OAuthSettings;
}

export interface GoogleAnalytics4OAuthEndpointsSettings {
/**
* Google's OAuth token and authorization endpoints
*/
export interface GoogleAnalytics4OAuthEndpoints {
/**
* The OAuth token endpoint URI
*/
readonly token?: string;

/**
* The OAuth authorization endpoint URI
*/
readonly authorization?: string;
}

/**
* The OAuth elements required for the execution of the refresh token grant flow.
*/
export interface GoogleAnalytics4RefreshTokenGrantFlow {
/**
* A non-expired refresh token.
*/
readonly refreshToken?: string;

/**
* The secret of the client app.
*/
readonly clientSecret?: string;

/**
* The id of the client app.
*/
readonly clientId?: string;
}

/**
* Represents the OAuth flow enabled for the GA4
*/
export interface GoogleAnalytics4OAuthFlow {
/**
* The details required for executing the refresh token grant flow
*/
readonly refreshTokenGrant: GoogleAnalytics4RefreshTokenGrantFlow;
}

Expand All @@ -34,12 +64,22 @@ export interface GoogleAnalytics4OAuthSettings {
* The access token to be used when interacting with Google Analytics 4
*
* Note that if only the access token is provided AppFlow is not able to retrieve a fresh access token when the current one is expired
*
* @default Retrieves a fresh accessToken with the information in the [flow property]{@link GoogleAnalytics4OAuthSettings#flow}
*/
readonly accessToken?: string;

/**
* The OAuth flow used for obtaining a new accessToken when the old is not present or expired.
*
* @default undefined. AppFlow will not request any new accessToken after expiry.
*/
readonly flow?: GoogleAnalytics4OAuthFlow;

readonly endpoints?: GoogleAnalytics4OAuthEndpointsSettings;
/**
* The OAuth token and authorization endpoints.
*/
readonly endpoints?: GoogleAnalytics4OAuthEndpoints;
}

export class GoogleAnalytics4ConnectorProfile extends ConnectorProfileBase {
Expand Down
Loading

0 comments on commit 9d9b804

Please sign in to comment.