npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

spheron-sdk-ts

v1.0.7

Published

![Banner](./images/1642011043069.jpeg) The Spheron SDK implements the exposed endpoints provided in SwaggerUI

Downloads

5

Readme

🚀 Spheron SDK TS

Banner The Spheron SDK implements the exposed endpoints provided in SwaggerUI

Swagger UI

😵 Run Locally

🥦 Clone the project

  git clone https://github.com/priyansuhub/spheron-sdk-ts.git

🧋 Go to the project directory

  cd spheron-sdk-ts/src

🥑 Install dependencies

  npm install

🏗️ Build Project

  npm run build

Test 🧑‍💻

Note: 📔

👉 Each test functions has no parameters

👉 Output is console logged

👉 Functions with parameters to be looked on carefully

👉 Uncomment the test function

  cd src/test
  tsc && node dist/test.js

🙇‍♂️ SDK Classes

🌟 Abstract base class

  Base class

| Base | API | Description | | :-------- | :------- | :------------------------- | | constructor | (key: string) | Required. User's API key | | method | patchData<T>(endpoint: string, value: any): Promise<T> | returns PATCH data response | | method | putData<T>(endpoint: string, value: any): Promise<T> | returns PUT data response | | method | postData<T>(endpoint: string, value: any): Promise<T> | returns POST data response | | method | deleteDataParam<T>(endpoint: string, value: string): Promise<T> | returns DELETE data response | | method | deleteData<T>(endpoint: string): Promise<T> | returns DELETE data response | | method | getData<T>(endpoint: string): Promise<T> | returns GET data response | | method | patchDataEmpty<T>(endpoint: string): Promise<T> | returns PATCH data response | | method | postDataEmpty<T>(endpoint: string): Promise<T> | returns POST data response | | method | async getDataParam<T>(endpoint: string): Promise<T> | returns GET data response |

💫 GetOrganization class extends base class

  GetOrganization class

| Base | API | Description | | :-------- | :------- | :------------------------- | | method | getOrganizationDetails (id: string): Promise<Organization> | All organization details | | method | getOrganizationUsers (id: string): Promise<Users[]> | Get all users of Organization | | method | getOrganizationUserById (id: string, idU: string): Promise<Users\|string> | Get a User's detail of Organization by Id | | method | getUserPlatformProfile (id: string, idU: string): Promise<PlatformProfile \| string> | Get a User's Platform profile | | method | getAllProviderProfilesOfUser (id: string, idUser: string): Promise<ProviderProfile[]> | Get a User' Provider Profile | | method | getProviderProfileOfUserById (id: string, idUser: string, idpP: string): Promise<ProviderProfile \| string> | Get a User' Provider Profile by Id| | method | getUserOrganisationsById (id: string, idUser: string): Promise<string[]> | Get a User's Organizations by Id| | method | getWalletDetails (id: string): Promise<Wallet> | Get Organization's Wallet details| | method | getWalletNetworkDetails (id: string): Promise<NetworkDetails> | Get a User's Organizations by Id| | method | getWalletTokenDetails (id: string): Promise<TokenDetails> | Get a User's Organizations by Id| | method | getAllInvitedMembers (id: string): Promise<InvitedMembers[]> | Get all the Invited Members| | method | getInvitedMembersById (id: string, invitedId: string): Promise<InvitedMembers \| string> | Get Invited Members by Id| | method | overdueStatus (id: string): Promise<Overdue> | Get Overdue status of Organization| | method | getProjectOrg (id: string): Promise<Project> | Returns the projects of organization. Supports pagination and filtering by project state.| | method | getProjectCount (id: string): Promise<number> | Returns the number of projects of organization.| | method | updateOrganizationProfileParams (id: string, name: string, username: string, image: string): Promise<boolean> | boolean value if the data got updated or Not| | method | updateOrganizationProfile (id: string, obj: Profile): Promise<boolean> | boolean value if the data got updated or Not| | method | deleteOrganization (id: string, userId: string): Promise<DeleteResponse> | DeleteResponse|

💫 InviteClass class extends base class

  InviteClass class

| InviteClass | API | Description | | :-------- | :------- | :------------------------- | | method | getInvitesById (id: string): Promise<Invite> | Return the invitations sent for the organization. | | method | inviteMembers (id: string, inviteEmail: string): Promise<InviteResponse> | The information about the invite. | | method | deleteInvite (id: string, inviteId: string): Promise<Invite> | The information about the deleted invite.|

💫 ProjectDetails class extends base class

  ProjectDetails class

| ProjectDetails | API | Description | | :-------- | :------- | :------------------------- | | method | getProjectDetailsById (id: string): Promise<Projects> | Returns the information about the project. | | method | getProjectDeploymentEnvironments (id: string): Promise<DeploymentEnvironments[]> | Returns the array of information about the Deployment Environment of the Project. | | method | getConfigurationDetailsById (id: string): Promise<Configuration> | Project Configuration Information | | method | getAllDomainDetailsOfProject (id: string): Promise<Domains[]> | Array of domain details of the project | | method | getDomainDetailsOfProjectByName (id: string, name: string): Promise<Domains> | domain details of the project |

💫 DeploymentInfo class extends base class

  DeploymentInfo class

| DeploymentInfo | API | Description | | :-------- | :------- | :------------------------- | | method | getDeploymentInfoByProjectId (id: string): Promise<LatestDeployment[]> | Returns an array of deployments for the project. Supports pagination and filtering by deployment status | | method | getDeploymentInfoByProjectIdLimit (id: string, lim: number): Promise<LatestDeployment[]> | Returns an array of deployments for the project with a limit. Supports pagination and filtering by deployment status | | method | getDeploymentInfoByProjectStatus (id: string, statusQuery: string): Promise<LatestDeployment[]> | Returns an array of deployments for the project with filter. Supports pagination and filtering by deployment status | | method | getDeploymentCount (id: string): Promise<ProjectDeploymentCount> | Information about the number of deployments. |

💫 State class extends base class

  State class

| State | API | Description | | :-------- | :------- | :------------------------- | | method | updateState (id: string, uState: string): Promise<StateResponse> | Message about the changed state.|

💫 CouponsClass class extends base class

  CouponsClass class

| CouponsClass | API | Description | | :-------- | :------- | :------------------------- | | method | getCouponDetails (id: string): Promise<Coupons> |Get request coupon details|

💫 Domain class extends base class

  Domain class

| Domain | API | Description | | :-------- | :------- | :------------------------- | | method | getDomain (id: string): Promise<DomainsGetResponse> | Get the domains of the project. | | method | getDomainByDomainId (id: string, domainId: string): Promise<DomainsResponse> | Get the domain of the project by Id. | | method | addDomainByProjectId (id: string, obj: DomainsRequest): Promise<DomainsResponse> | Added domain. | | method | updateDomainByDomainId (id: string, domainId: string, obj: UpdateDomainsRequest): Promise<DomainsResponse> | Updated domain. | | method | deleteDomainByDomainId (id: string, domainId: string): Promise<DomainDelete> | Success of the deletion. | | method | verifyDomainByProjectId (id: string, domainId: string): Promise<VerifyDomainType> | Result of the operation.|

💫 AddEnvironment class extends base class

  AddEnvironment class

| AddEnvironment | API | Description | | :-------- | :------- | :------------------------- | | method | addEnvironmentVariables (id: string, Name: string, Value: string, DeploymentEnvironment: string[]): Promise<PostEnvironmentResponse> | Added environment variables. | | method | updateEnvironmentVariable (id: string, envId: string, Name: string, Value: string, DeploymentEnvironment: string[]): Promise<PutEnvironmentResponse> | Updated environment variable. | | method | deleteEnvironmentVariable (id: string, envId: string): Promise<ResponseDelete> | Result of the delete operation. |

💫 DeploymentEnvironment class extends base class

  DeploymentEnvironment class

| DeploymentEnvironment | API | Description | | :-------- | :------- | :------------------------- | | method | getDeploymentEnvironment (id: string): Promise<DeploymentEnvGet> | List of deployment environments. | | method | addDeploymentEnvironment (id: string, Name: string, Branches: string[], Protocol: string): Promise<addDeploymentEnvResponse> | Added deployment environment | | method | updateDeploymentEnvironmnet (id: string, envVarId: string, Name: string, Branches: string[], Protocol: string): Promise<updateDeploymentEnvResponse> | Updated deployment environment | | method | deleteDeploymentEnvironmnet (id: string, envVarId: string): Promise<ResponseDelete>> |Deleted deployment environment | | method | activateDeploymentEnvironment (id: string, envVarId: string): Promise<updateDeploymentEnvResponse> | activated deployment environment| | method | deactivateDeploymentEnvironment (id: string, envVarId: string): Promise<updateDeploymentEnvResponse> | Deactivated deployment environment |

💫 Deployment class extends base class

   Deployment class

| Deployment | API | Description | | :-------- | :------- | :------------------------- | | method | deploy (input: DeploymentRequest): Promise<DeploymentIdResponse> | Information about the deployment | | method | getDeployment (id: string): Promise<DeploymentIdResponse> | Information about the deployment | | method | authorizeDeployment (id: string): Promise<Authorize> | Information about the deployment | | method | cancelDeployment (id: string): Promise<CancelDeployment> |Information about the cancelation of deployment. | | method | redeployDeployment (id: string): Promise<Redeploy> | Information about the redeployment.| | method | defaultDeployment (orgId: string, gitUrl: string, repoName: string, uniqueTopicId: string, protocol: string, provider: string, branch: string): Promise<DeploymentResponse> | Information about the start of deployment. |

📹 Video Tutorial 🤩

Video