Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@tayeh.js implementation in JS and TS
Hello. I hope you are well =)) We are proud that on behalf of Pchas Company , we can provide our new technology to you, dear developers and users.
The tools we provide here are part of a larger project called Tayeh. Tayeh provides a complete and convenient environment for you so that you can easily do all the steps related to the expansion of your business. For more information, visit the Tayeh website.
In "Tayeh" we provide users with the opportunity to use information about themselves and expand their business online. Now we want to give a special opportunity to developers in this regard who can use our API and no longer need to develop the server side and create data storage tables. Finally, we went a step further and created an API client library to minimize your workload and save you a lot of time. In short, we have made everything easier. Don't you think so? ;) Where is this library now and how should it be used? I will tell you. Lets start...
You need to do something before installing the library.
Go to the Tayeh website and get API_KEY
as your username and API_SECRET
as your password by following the steps described there.
We can now start the installation using this information...
Install the package from npm
or yarn
We named it "tayeh.js":
npm install tayeh.js
# or
yarn add tayeh.js
and require it in your project:
const TayehClient = require('tayeh.js');
// or
import TayehClient from 'tayeh.js';
Then create an instance: (The values you received from the site apply here)
const tayeh = new TayehClient({
name: "project name (can be everything)",
api_access: "your instance access key",
instance_id: "access key"
});
After creating an instance in the project and sending the input arguments, a custom API _ACCESS
will be generated for you to use in the library's internal requests.
Library API requests are currently categorized into User
, Instance
, Customer
, Product
, Crm
and Media
classes.
In this document, we try to provide you with a complete guide for using the functions of these libraries. Be sure to read this guide first.
Then it is enough to call the equivalent method from the created instance to achieve the desired result.
for example:
//Get an instance with an ID
tayeh.getProducts().then((data) => {
//you have data. use it
})
We start the guide here...
Method title | Input Arguments | Defaults & Limits | Descriptions | Sample output |
---|---|---|---|---|
getProducts | (params?: ProductParams) | |||
createProduct | (params: NewProduct) | |||
deleteProduct | (product_id: string) | |||
updateProduct | (params: UpdateProduct) | |||
createProductPrice | (params: CreatePrice) | |||
updateProductPrice | (params: UpdatePrice) | |||
updateProductPrices | (params: UpdatePrices) | |||
getProductPrices | (product_id: string) | |||
addProductMedia | (product_id: string, params: ProductMedia) | |||
deleteProductMedia | (product_id: string, media_id: string) | |||
setProductFeatures | (product_id: string, body: SetFeatures) | |||
setProductPriceFilter | (product_id: string, params: SetProPrices) | |||
deleteOptionPrice | (product_id: string, option_id: string) | |||
getInstanceInvoices | (params?: InvoicesParams) | |||
getInstanceInvoice | (invoice_id: string) | |||
deleteInstanceInvoice | (invoice_id: string) | |||
setDeliveryStatus | (invoice_id: string, body: SetDeliveryStatus) | |||
getInstanceCustomers | (params?: SearchParams) | |||
getInstanceCustomer | (customer_id: string) | |||
deleteInstanceCustomer | (customer_id: number) | |||
createInstanceCustomer | (params: NewCustomer) | |||
updateInstanceCustomer | (customer_id: string, params: UpdateCustomer) | |||
acceptInstanceCustomer | (customer_id: string) | |||
getCategories | (params?: CategoryParams) | |||
createCategory | (params: NewCategory) | |||
updateCategory | (params: EditCategory) | |||
deleteCategory | (category_id: string) | |||
createCategoryFilterGroup | (category_id: string, params: FilterGroup) | |||
createCategoryFilter | (category_id: string, params: CategoryFilter) | |||
getCategoryFeatures | (category_id: string) | |||
deleteCategoryFilter | (category_id: string, filter_id: string) | |||
deleteFilterOption | (category_id: string, filter_id: string, option_id: string) | |||
setCategoryStatus | (category_id: string, body: CategoryStatus) | |||
createBrand | (params: NewBrand) | |||
updateBrand | (params: EditBrand) | |||
deleteBrand | (brand_id: string) | |||
getBrands | () | |||
createBannerCategory | (body: NewBannerCat) | |||
getBannerCategories | () | |||
deleteBannerCategory | (category_id: string) | |||
getBanners | (params?: BannerParams) | |||
createBanner | (body: NewBanner) | |||
deleteBanner | (banner_id: string) | |||
updateBanner | (body: EditBanner) | |||
getInstanceDeliveryMethods | () | |||
createInstanceDeliveryMethod | (body: NewDeliveryMethod) | |||
setDeliveryMethodStatus | (method_id: string, body: SetMethodStatus) | |||
createNotification | (body: CreateNotif) | |||
getInstanceNotifications | (params: Pagination) | |||
getSearchFilters | (params?: SearchFilters) | |||
sendInviteSms | (params: InviteParams) | |||
getTopKeywords | (params: SearchFilters) | |||
updateRemainingWithChoices | (body: AutoRemaining) | |||
updateRemainingsWithChoices | (body: BatchRemaining) |
Method title | Input Arguments | Defaults & Limits | Descriptions | Sample output |
---|---|---|---|---|
getUserMe | () | |||
getInstancePrimary | () | |||
setInstancePrimary | (instance_id: number) | |||
getUserInstances | (params?: Pagination) | |||
updateInstance | (params?: { page?: number; per_page?: number; }) |
Method title | Input Arguments | Defaults & Limits | Descriptions | Sample output |
---|---|---|---|---|
getMedia | (media_id: number) | |||
uploadMedia | (params: NewMedia) |
Method title | Input Arguments | Response (T) Wraped in Promise<AxiosResponse<T >> |
---|---|---|
getPassword | (mobile: string) | AuthResponse |
customerVerify | (mobile: string, code: string) | AuthResponse |
getVerification | (email: string) | AuthResponse |
emailVerify | (email: string, code: string) | AuthResponse |
customerLogin | (username: string, password: string) | AuthResponse |
customerRegister | (body: RegisterCustomer) | AuthResponse |
resetCustomerPassword | (body: CustomerResetPass) | void |
getCustomerMe | () | GetCustomerProfileResposne |
getCustomer | () | GetCustomerProfileResposne |
updateCustomer | (body: UpdateCustomer) | SimpleErr |
addProductToCart | (body: AddToCartBody) | SimpleErr |
toggleProductFavorite | (body: ToggleFavorite) | SimpleErr |
getCustomerCart | (params: Pagination) | GetCustomerCartResponse |
updateCartItem | (body: UpdateCartItem) | any |
deleteCartItem | (cart_item_id: string) | SimpleErr |
getNotifications | (params?: Pagination) | {objects: GetCustomerNotificationResponse[];count: number; } |
getCustomerNotification | (notification_id: string) | GetCustomerNotificationResponse |
getFavorites | (params: Pagination) | any |
getProductsHistory | (params: Pagination) | [GetCustomerFavoriteProductResponse] |
getAddresses | () | GetCustomerAddressResponse[] |
createAddress | (body: NewAddress) | SimpleErr |
updateAddress | (body: UpdateAddress) | void |
deleteAddress | (address_id: string) | SimpleErr |
setCartDelivery | (body: NewAddress, d_method_id?: string, methods?: PaymentMethod) | SimpleErr |
setAvatar | (avatar_id: string) | SimpleErr |
getInvoicesHistory | (params?: InvoiceHistory) | [GetCustomerInvoiceResponse] |
getInvoice | (invoice_id: string) | GetCustomerInvoiceResponse |
getCustomerCredit | () | GetCustomerCreditResponse |
getCartPay | () | PayCustomerCartResponse |
depositCustomerMoney | (body: DepositMoney) | CustomerDepositResponse |
getCartDeliveryMethods | () | GetCustomerDeliveryMethodsResponse |
getLatestUnseenNotification | () | GetCustomerNotificationResponse[] |
Method title | Input Arguments | Defaults & Limits | Descriptions | Sample output |
---|---|---|---|---|
getCountries | (params: SearchParams) | |||
getIranProvinces | (params: Qsearch) | |||
getStateCities | (state_id: string, params: Qsearch) |
Contributions are welcome. Please submit an issue if you see something broken or in need of improving. You can also contact us through the communication channels mentioned in Tayeh and Pchas Company websites. Thanks for your support.
FAQs
tayeh shop-api client
We found that tayeh.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.