Skip to content

Commit

Permalink
Merge pull request #226 from neynarxyz/tdb/oembed-fixup
Browse files Browse the repository at this point in the history
Fixup oEmbed types for better Readme doc presentation
  • Loading branch information
tybook authored Oct 29, 2024
2 parents 5fe5fbe + 9d06f5a commit a5c72d9
Show file tree
Hide file tree
Showing 13 changed files with 69 additions and 79 deletions.
16 changes: 8 additions & 8 deletions src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ models/hydrated-follower.ts
models/image-object.ts
models/index.ts
models/individual-hash-obj.ts
models/link-type-data-all-of.ts
models/link-type-data.ts
models/location-address.ts
models/location.ts
models/mark-notifications-as-seen-req-body.ts
Expand All @@ -175,10 +173,16 @@ models/notification-type.ts
models/notification.ts
models/notifications-response.ts
models/oembed-data.ts
models/oembed-link-data-all-of.ts
models/oembed-link-data.ts
models/oembed-photo-data-all-of.ts
models/oembed-photo-data.ts
models/oembed-rich-data-all-of.ts
models/oembed-rich-data.ts
models/oembed-video-data-all-of.ts
models/oembed-video-data.ts
models/og-object.ts
models/operation-response.ts
models/photo-type-data-all-of.ts
models/photo-type-data.ts
models/post-cast-req-body-embeds-cast-id-properties.ts
models/post-cast-req-body-embeds.ts
models/post-cast-req-body.ts
Expand All @@ -205,8 +209,6 @@ models/relevant-followers-response.ts
models/remove-channel-member-request.ts
models/remove-verification-req-body.ts
models/respond-channel-invite-request.ts
models/rich-type-data-all-of.ts
models/rich-type-data.ts
models/searched-user.ts
models/signed-key-request-sponsor.ts
models/signer.ts
Expand Down Expand Up @@ -258,8 +260,6 @@ models/validated-frame-action.ts
models/verification-chain-id.ts
models/verification-type.ts
models/video-object.ts
models/video-type-data-all-of.ts
models/video-type-data.ts
models/webhook-delete-req-body.ts
models/webhook-list-response.ts
models/webhook-patch-req-body.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@

// May contain unused imports in some cases
// @ts-ignore
import { LinkTypeData } from './link-type-data';
import { OembedLinkData } from './oembed-link-data';
// May contain unused imports in some cases
// @ts-ignore
import { PhotoTypeData } from './photo-type-data';
import { OembedPhotoData } from './oembed-photo-data';
// May contain unused imports in some cases
// @ts-ignore
import { RichTypeData } from './rich-type-data';
import { OembedRichData } from './oembed-rich-data';
// May contain unused imports in some cases
// @ts-ignore
import { VideoTypeData } from './video-type-data';
import { OembedVideoData } from './oembed-video-data';

/**
* @type EmbedUrlMetadataHtmlAllOfOembed
* @export
*/
export type EmbedUrlMetadataHtmlAllOfOembed = { type: 'link' } & LinkTypeData | { type: 'photo' } & PhotoTypeData | { type: 'rich' } & RichTypeData | { type: 'video' } & VideoTypeData;
export type EmbedUrlMetadataHtmlAllOfOembed = { type: 'link' } & OembedLinkData | { type: 'photo' } & OembedPhotoData | { type: 'rich' } & OembedRichData | { type: 'video' } & OembedVideoData;


16 changes: 8 additions & 8 deletions src/neynar-api/v2/openapi-farcaster/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ export * from './get-casts-req-body';
export * from './hydrated-follower';
export * from './image-object';
export * from './individual-hash-obj';
export * from './link-type-data';
export * from './link-type-data-all-of';
export * from './location';
export * from './location-address';
export * from './mark-notifications-as-seen-req-body';
Expand All @@ -148,10 +146,16 @@ export * from './notification';
export * from './notification-type';
export * from './notifications-response';
export * from './oembed-data';
export * from './oembed-link-data';
export * from './oembed-link-data-all-of';
export * from './oembed-photo-data';
export * from './oembed-photo-data-all-of';
export * from './oembed-rich-data';
export * from './oembed-rich-data-all-of';
export * from './oembed-video-data';
export * from './oembed-video-data-all-of';
export * from './og-object';
export * from './operation-response';
export * from './photo-type-data';
export * from './photo-type-data-all-of';
export * from './post-cast-req-body';
export * from './post-cast-req-body-embeds';
export * from './post-cast-req-body-embeds-cast-id-properties';
Expand All @@ -178,8 +182,6 @@ export * from './relevant-followers-response';
export * from './remove-channel-member-request';
export * from './remove-verification-req-body';
export * from './respond-channel-invite-request';
export * from './rich-type-data';
export * from './rich-type-data-all-of';
export * from './searched-user';
export * from './signed-key-request-sponsor';
export * from './signer';
Expand Down Expand Up @@ -231,8 +233,6 @@ export * from './validated-frame-action-tapped-button';
export * from './verification-chain-id';
export * from './verification-type';
export * from './video-object';
export * from './video-type-data';
export * from './video-type-data-all-of';
export * from './webhook';
export * from './webhook-delete-req-body';
export * from './webhook-list-response';
Expand Down
12 changes: 1 addition & 11 deletions src/neynar-api/v2/openapi-farcaster/models/oembed-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface OembedData {
* @type {string}
* @memberof OembedData
*/
'type': OembedDataTypeEnum;
'type': string;
/**
*
* @type {string}
Expand Down Expand Up @@ -88,13 +88,3 @@ export interface OembedData {
'thumbnail_height'?: number | null;
}

export const OembedDataTypeEnum = {
Rich: 'rich',
Video: 'video',
Photo: 'photo',
Link: 'link'
} as const;

export type OembedDataTypeEnum = typeof OembedDataTypeEnum[keyof typeof OembedDataTypeEnum];


Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
/**
*
* @export
* @interface LinkTypeDataAllOf
* @interface OembedLinkDataAllOf
*/
export interface LinkTypeDataAllOf {
export interface OembedLinkDataAllOf {
/**
*
* @type {string}
* @memberof LinkTypeDataAllOf
* @memberof OembedLinkDataAllOf
*/
'type'?: LinkTypeDataAllOfTypeEnum;
'type'?: OembedLinkDataAllOfTypeEnum;
}

export const LinkTypeDataAllOfTypeEnum = {
export const OembedLinkDataAllOfTypeEnum = {
Link: 'link'
} as const;

export type LinkTypeDataAllOfTypeEnum = typeof LinkTypeDataAllOfTypeEnum[keyof typeof LinkTypeDataAllOfTypeEnum];
export type OembedLinkDataAllOfTypeEnum = typeof OembedLinkDataAllOfTypeEnum[keyof typeof OembedLinkDataAllOfTypeEnum];


Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import { OembedData } from './oembed-data';
// May contain unused imports in some cases
// @ts-ignore
import { VideoTypeDataAllOf } from './video-type-data-all-of';
import { OembedLinkDataAllOf } from './oembed-link-data-all-of';

/**
* @type VideoTypeData
* @type OembedLinkData
* @export
*/
export type VideoTypeData = OembedData & VideoTypeDataAllOf;
export type OembedLinkData = OembedData & OembedLinkDataAllOf;


Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,39 @@
/**
*
* @export
* @interface PhotoTypeDataAllOf
* @interface OembedPhotoDataAllOf
*/
export interface PhotoTypeDataAllOf {
export interface OembedPhotoDataAllOf {
/**
*
* @type {string}
* @memberof PhotoTypeDataAllOf
* @memberof OembedPhotoDataAllOf
*/
'type'?: PhotoTypeDataAllOfTypeEnum;
'type'?: OembedPhotoDataAllOfTypeEnum;
/**
* The source URL of the image. Consumers should be able to insert this URL into an <img> element. Only HTTP and HTTPS URLs are valid.
* @type {string}
* @memberof PhotoTypeDataAllOf
* @memberof OembedPhotoDataAllOf
*/
'url': string | null;
/**
* The width in pixels of the image specified in the url parameter.
* @type {number}
* @memberof PhotoTypeDataAllOf
* @memberof OembedPhotoDataAllOf
*/
'width': number | null;
/**
* The height in pixels of the image specified in the url parameter.
* @type {number}
* @memberof PhotoTypeDataAllOf
* @memberof OembedPhotoDataAllOf
*/
'height': number | null;
}

export const PhotoTypeDataAllOfTypeEnum = {
export const OembedPhotoDataAllOfTypeEnum = {
Photo: 'photo'
} as const;

export type PhotoTypeDataAllOfTypeEnum = typeof PhotoTypeDataAllOfTypeEnum[keyof typeof PhotoTypeDataAllOfTypeEnum];
export type OembedPhotoDataAllOfTypeEnum = typeof OembedPhotoDataAllOfTypeEnum[keyof typeof OembedPhotoDataAllOfTypeEnum];


Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import { OembedData } from './oembed-data';
// May contain unused imports in some cases
// @ts-ignore
import { RichTypeDataAllOf } from './rich-type-data-all-of';
import { OembedPhotoDataAllOf } from './oembed-photo-data-all-of';

/**
* @type RichTypeData
* @type OembedPhotoData
* @export
*/
export type RichTypeData = OembedData & RichTypeDataAllOf;
export type OembedPhotoData = OembedData & OembedPhotoDataAllOf;


Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,39 @@
/**
*
* @export
* @interface RichTypeDataAllOf
* @interface OembedRichDataAllOf
*/
export interface RichTypeDataAllOf {
export interface OembedRichDataAllOf {
/**
*
* @type {string}
* @memberof RichTypeDataAllOf
* @memberof OembedRichDataAllOf
*/
'type'?: RichTypeDataAllOfTypeEnum;
'type'?: OembedRichDataAllOfTypeEnum;
/**
* The HTML required to display the resource. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities. The markup should be valid XHTML 1.0 Basic.
* @type {string}
* @memberof RichTypeDataAllOf
* @memberof OembedRichDataAllOf
*/
'html': string | null;
/**
* The width in pixels required to display the HTML.
* @type {number}
* @memberof RichTypeDataAllOf
* @memberof OembedRichDataAllOf
*/
'width': number | null;
/**
* The height in pixels required to display the HTML.
* @type {number}
* @memberof RichTypeDataAllOf
* @memberof OembedRichDataAllOf
*/
'height': number | null;
}

export const RichTypeDataAllOfTypeEnum = {
export const OembedRichDataAllOfTypeEnum = {
Rich: 'rich'
} as const;

export type RichTypeDataAllOfTypeEnum = typeof RichTypeDataAllOfTypeEnum[keyof typeof RichTypeDataAllOfTypeEnum];
export type OembedRichDataAllOfTypeEnum = typeof OembedRichDataAllOfTypeEnum[keyof typeof OembedRichDataAllOfTypeEnum];


Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

// May contain unused imports in some cases
// @ts-ignore
import { LinkTypeDataAllOf } from './link-type-data-all-of';
import { OembedData } from './oembed-data';
// May contain unused imports in some cases
// @ts-ignore
import { OembedData } from './oembed-data';
import { OembedRichDataAllOf } from './oembed-rich-data-all-of';

/**
* @type LinkTypeData
* @type OembedRichData
* @export
*/
export type LinkTypeData = LinkTypeDataAllOf & OembedData;
export type OembedRichData = OembedData & OembedRichDataAllOf;


Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,39 @@
/**
*
* @export
* @interface VideoTypeDataAllOf
* @interface OembedVideoDataAllOf
*/
export interface VideoTypeDataAllOf {
export interface OembedVideoDataAllOf {
/**
*
* @type {string}
* @memberof VideoTypeDataAllOf
* @memberof OembedVideoDataAllOf
*/
'type'?: VideoTypeDataAllOfTypeEnum;
'type'?: OembedVideoDataAllOfTypeEnum;
/**
* The HTML required to embed a video player. The HTML should have no padding or margins. Consumers may wish to load the HTML in an off-domain iframe to avoid XSS vulnerabilities.
* @type {string}
* @memberof VideoTypeDataAllOf
* @memberof OembedVideoDataAllOf
*/
'html': string | null;
/**
* The width in pixels required to display the HTML.
* @type {number}
* @memberof VideoTypeDataAllOf
* @memberof OembedVideoDataAllOf
*/
'width': number | null;
/**
* The height in pixels required to display the HTML.
* @type {number}
* @memberof VideoTypeDataAllOf
* @memberof OembedVideoDataAllOf
*/
'height': number | null;
}

export const VideoTypeDataAllOfTypeEnum = {
export const OembedVideoDataAllOfTypeEnum = {
Video: 'video'
} as const;

export type VideoTypeDataAllOfTypeEnum = typeof VideoTypeDataAllOfTypeEnum[keyof typeof VideoTypeDataAllOfTypeEnum];
export type OembedVideoDataAllOfTypeEnum = typeof OembedVideoDataAllOfTypeEnum[keyof typeof OembedVideoDataAllOfTypeEnum];


Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
import { OembedData } from './oembed-data';
// May contain unused imports in some cases
// @ts-ignore
import { PhotoTypeDataAllOf } from './photo-type-data-all-of';
import { OembedVideoDataAllOf } from './oembed-video-data-all-of';

/**
* @type PhotoTypeData
* @type OembedVideoData
* @export
*/
export type PhotoTypeData = OembedData & PhotoTypeDataAllOf;
export type OembedVideoData = OembedData & OembedVideoDataAllOf;


2 changes: 1 addition & 1 deletion src/oas
Submodule oas updated 1 files
+17 −18 src/v2/spec.yaml

0 comments on commit a5c72d9

Please sign in to comment.