Skip to content

Commit

Permalink
feat: Navigation menus
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Oct 24, 2024
1 parent f977946 commit 93995dd
Show file tree
Hide file tree
Showing 15 changed files with 271 additions and 199 deletions.
19 changes: 0 additions & 19 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"filesize": "^10.1.4",
"highlight.js": "^11.10.0",
"langchain": "^0.2.13",
"localforage": "^1.10.0",
"marked": "^14.0.0",
"marked-highlight": "^2.1.4",
"mime": "^4.0.4",
Expand Down
23 changes: 23 additions & 0 deletions public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions public/icons/aleph.svg

This file was deleted.

51 changes: 0 additions & 51 deletions public/icons/powered-by.svg

This file was deleted.

51 changes: 0 additions & 51 deletions public/icons/powered-by_lighten.svg

This file was deleted.

6 changes: 0 additions & 6 deletions public/icons/telegram.svg

This file was deleted.

8 changes: 0 additions & 8 deletions public/icons/twitter-x.svg

This file was deleted.

140 changes: 137 additions & 3 deletions src/apis/subscriptions/schemas.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,11 @@ export const SubscriptionAccountSchema = {
},
type: 'object',
required: ['address', 'chain'],
title: 'SubscriptionAccount'
title: 'SubscriptionAccount',
example: {
address: '0x0000000000000000000000000000000000000000',
chain: 'base'
}
} as const;

export const SubscriptionChainSchema = {
Expand All @@ -204,14 +208,14 @@ export const SubscriptionChainSchema = {

export const SubscriptionProviderSchema = {
type: 'string',
enum: ['hold', 'subs'],
enum: ['hold', 'subs', 'vouchers'],
title: 'SubscriptionProvider',
description: 'An enumeration.'
} as const;

export const SubscriptionTypeSchema = {
type: 'string',
enum: ['standard'],
enum: ['pro', 'advanced', 'agent'],
title: 'SubscriptionType',
description: 'An enumeration.'
} as const;
Expand Down Expand Up @@ -244,4 +248,134 @@ export const ValidationErrorSchema = {
type: 'object',
required: ['loc', 'msg', 'type'],
title: 'ValidationError'
} as const;

export const VouchersCreatedSubscriptionSchema = {
properties: {
account: {
'$ref': '#/components/schemas/SubscriptionAccount'
},
type: {
'$ref': '#/components/schemas/SubscriptionType'
},
end_time: {
type: 'integer',
title: 'End Time'
},
post_hash: {
type: 'string',
title: 'Post Hash'
},
subscription_id: {
type: 'string',
title: 'Subscription Id'
}
},
type: 'object',
required: ['account', 'type', 'end_time', 'post_hash', 'subscription_id'],
title: 'VouchersCreatedSubscription'
} as const;

export const VouchersDeleteSubscribeBodySchema = {
properties: {
subscription_ids: {
items: {
type: 'string'
},
type: 'array',
title: 'Subscription Ids'
}
},
type: 'object',
required: ['subscription_ids'],
title: 'VouchersDeleteSubscribeBody'
} as const;

export const VouchersDeleteSubscriptionResponseSchema = {
properties: {
cancelled_subscriptions: {
items: {
type: 'string'
},
type: 'array',
title: 'Cancelled Subscriptions'
},
not_found_subscriptions: {
items: {
type: 'string'
},
type: 'array',
title: 'Not Found Subscriptions'
}
},
type: 'object',
required: ['cancelled_subscriptions', 'not_found_subscriptions'],
title: 'VouchersDeleteSubscriptionResponse'
} as const;

export const VouchersPostRefreshSubscriptionsResponseSchema = {
properties: {
cancelled_subscriptions: {
items: {
type: 'string'
},
type: 'array',
title: 'Cancelled Subscriptions'
}
},
type: 'object',
required: ['cancelled_subscriptions'],
title: 'VouchersPostRefreshSubscriptionsResponse'
} as const;

export const VouchersPostSubscribeBodySchema = {
properties: {
subscriptions: {
items: {
'$ref': '#/components/schemas/VouchersSubscription'
},
type: 'array',
title: 'Subscriptions'
},
password: {
type: 'string',
title: 'Password'
}
},
type: 'object',
required: ['subscriptions', 'password'],
title: 'VouchersPostSubscribeBody'
} as const;

export const VouchersPostSubscriptionResponseSchema = {
properties: {
created_subscriptions: {
items: {
'$ref': '#/components/schemas/VouchersCreatedSubscription'
},
type: 'array',
title: 'Created Subscriptions'
}
},
type: 'object',
required: ['created_subscriptions'],
title: 'VouchersPostSubscriptionResponse'
} as const;

export const VouchersSubscriptionSchema = {
properties: {
account: {
'$ref': '#/components/schemas/SubscriptionAccount'
},
type: {
'$ref': '#/components/schemas/SubscriptionType'
},
end_time: {
type: 'integer',
title: 'End Time'
}
},
type: 'object',
required: ['account', 'type', 'end_time'],
title: 'VouchersSubscription'
} as const;
32 changes: 31 additions & 1 deletion src/apis/subscriptions/services.gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is auto-generated by @hey-api/openapi-ts

import { createClient, createConfig, type Options } from '@hey-api/client-axios';
import type { GetUserSubscriptionsSubscriptionsGetData, GetUserSubscriptionsSubscriptionsGetError, GetUserSubscriptionsSubscriptionsGetResponse, SubscribeHoldSubscriptionPostData, SubscribeHoldSubscriptionPostError, SubscribeHoldSubscriptionPostResponse, UnsubscribeHoldSubscriptionDeleteData, UnsubscribeHoldSubscriptionDeleteError, UnsubscribeHoldSubscriptionDeleteResponse, RefreshActiveHoldSubscriptionsHoldRefreshPostError, RefreshActiveHoldSubscriptionsHoldRefreshPostResponse, HoldSubscriptionMessagesHoldMessageGetData, HoldSubscriptionMessagesHoldMessageGetError, HoldSubscriptionMessagesHoldMessageGetResponse, RefreshSubsRefreshPostError, RefreshSubsRefreshPostResponse } from './types.gen';
import type { GetUserSubscriptionsSubscriptionsGetData, GetUserSubscriptionsSubscriptionsGetError, GetUserSubscriptionsSubscriptionsGetResponse, SubscribeHoldSubscriptionPostData, SubscribeHoldSubscriptionPostError, SubscribeHoldSubscriptionPostResponse, UnsubscribeHoldSubscriptionDeleteData, UnsubscribeHoldSubscriptionDeleteError, UnsubscribeHoldSubscriptionDeleteResponse, RefreshActiveHoldSubscriptionsHoldRefreshPostError, RefreshActiveHoldSubscriptionsHoldRefreshPostResponse, HoldSubscriptionMessagesHoldMessageGetData, HoldSubscriptionMessagesHoldMessageGetError, HoldSubscriptionMessagesHoldMessageGetResponse, RefreshSubsRefreshPostError, RefreshSubsRefreshPostResponse, SubscribeVouchersSubscriptionPostData, SubscribeVouchersSubscriptionPostError, SubscribeVouchersSubscriptionPostResponse, CancelVouchersSubscriptionsVouchersSubscriptionDeleteData, CancelVouchersSubscriptionsVouchersSubscriptionDeleteError, CancelVouchersSubscriptionsVouchersSubscriptionDeleteResponse, RefreshActiveVouchersSubscriptionsVouchersRefreshPostError, RefreshActiveVouchersSubscriptionsVouchersRefreshPostResponse } from './types.gen';

export const client = createClient(createConfig());

Expand All @@ -15,6 +15,7 @@ export const getUserSubscriptionsSubscriptionsGet = <ThrowOnError extends boolea

/**
* Subscribe
* Subscribe to a plan
*/
export const subscribeHoldSubscriptionPost = <ThrowOnError extends boolean = false>(options: Options<SubscribeHoldSubscriptionPostData, ThrowOnError>) => { return (options?.client ?? client).post<SubscribeHoldSubscriptionPostResponse, SubscribeHoldSubscriptionPostError, ThrowOnError>({
...options,
Expand All @@ -23,6 +24,7 @@ export const subscribeHoldSubscriptionPost = <ThrowOnError extends boolean = fal

/**
* Unsubscribe
* Unsubscribe of an existing subscription
*/
export const unsubscribeHoldSubscriptionDelete = <ThrowOnError extends boolean = false>(options: Options<UnsubscribeHoldSubscriptionDeleteData, ThrowOnError>) => { return (options?.client ?? client).delete<UnsubscribeHoldSubscriptionDeleteResponse, UnsubscribeHoldSubscriptionDeleteError, ThrowOnError>({
...options,
Expand All @@ -31,6 +33,7 @@ export const unsubscribeHoldSubscriptionDelete = <ThrowOnError extends boolean =

/**
* Refresh Active Hold Subscriptions
* Delete existing active hold subscriptions if not enough tokens held in the wallet
*/
export const refreshActiveHoldSubscriptionsHoldRefreshPost = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { return (options?.client ?? client).post<RefreshActiveHoldSubscriptionsHoldRefreshPostResponse, RefreshActiveHoldSubscriptionsHoldRefreshPostError, ThrowOnError>({
...options,
Expand All @@ -53,4 +56,31 @@ export const holdSubscriptionMessagesHoldMessageGet = <ThrowOnError extends bool
export const refreshSubsRefreshPost = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { return (options?.client ?? client).post<RefreshSubsRefreshPostResponse, RefreshSubsRefreshPostError, ThrowOnError>({
...options,
url: '/subs/refresh'
}); };

/**
* Subscribe
* Create one or multiple vouchers subscriptions
*/
export const subscribeVouchersSubscriptionPost = <ThrowOnError extends boolean = false>(options: Options<SubscribeVouchersSubscriptionPostData, ThrowOnError>) => { return (options?.client ?? client).post<SubscribeVouchersSubscriptionPostResponse, SubscribeVouchersSubscriptionPostError, ThrowOnError>({
...options,
url: '/vouchers/subscription'
}); };

/**
* Cancel Vouchers Subscriptions
* Stop some vouchers subscriptions
*/
export const cancelVouchersSubscriptionsVouchersSubscriptionDelete = <ThrowOnError extends boolean = false>(options: Options<CancelVouchersSubscriptionsVouchersSubscriptionDeleteData, ThrowOnError>) => { return (options?.client ?? client).delete<CancelVouchersSubscriptionsVouchersSubscriptionDeleteResponse, CancelVouchersSubscriptionsVouchersSubscriptionDeleteError, ThrowOnError>({
...options,
url: '/vouchers/subscription'
}); };

/**
* Refresh Active Vouchers Subscriptions
* Check existing vouchers subscriptions to stop if the end_date is passed
*/
export const refreshActiveVouchersSubscriptionsVouchersRefreshPost = <ThrowOnError extends boolean = false>(options?: Options<unknown, ThrowOnError>) => { return (options?.client ?? client).post<RefreshActiveVouchersSubscriptionsVouchersRefreshPostResponse, RefreshActiveVouchersSubscriptionsVouchersRefreshPostError, ThrowOnError>({
...options,
url: '/vouchers/refresh'
}); };
Loading

0 comments on commit 93995dd

Please sign in to comment.