Skip to content

Commit

Permalink
[Auto Generated] 1.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Oct 8, 2024
1 parent 538e7f9 commit 1688883
Show file tree
Hide file tree
Showing 16 changed files with 4,399 additions and 2,174 deletions.
3,279 changes: 3,279 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Get started with the Kotlin Development SDK for Fynd Platform

# Usage

1. Add the dependency in your app build.gradle `implementation 'com.github.gofynd:fdk-client-kotlin:1.4.12'` in your app build.gradle
1. Add the dependency in your app build.gradle `implementation 'com.github.gofynd:fdk-client-kotlin:1.4.13'` in your app build.gradle
2. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
minSdkVersion 21
targetSdkVersion 31
versionCode 2
versionName "1.4.12"
versionName "1.4.13"
multiDexEnabled true

vectorDrawables.useSupportLibrary = true
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/sdk/application/Navigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ enum class Navigator(
pageType = PageType.orderStatus,
navName = "Order status",
link = "/cart/order-status"
),

LOCATE_US(
pageType = PageType.locateUs,
navName = "Locate us",
link = "/locate-us"
)

}
5 changes: 4 additions & 1 deletion src/main/java/com/sdk/application/PageType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ import android.net.Uri
returnPolicy("return-policy"),

@SerializedName("order-status")
orderStatus("order-status");
orderStatus("order-status"),

@SerializedName("locate-us")
locateUs("locate-us");


companion object {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sdk/common/AccessTokenInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AccessTokenInterceptor(
}

if (!original.headers.names().contains("x-fp-sdk-version")) {
header("x-fp-sdk-version", "1.4.12")
header("x-fp-sdk-version", "1.4.13")
}

if (!original.headers.names().contains("x-currency-code")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApplicationHeaderInterceptor(
header("x-currency-code", currencyCode)
}
if (!original.headers.names().contains("x-fp-sdk-version")) {
header("x-fp-sdk-version", "1.4.12")
header("x-fp-sdk-version", "1.4.13")
}
val bearerToken =
Base64.encodeToString(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sdk/common/PublicHeaderInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PublicHeaderInterceptor(
val original = chain.request()

val builder = original.newBuilder()
.header("x-fp-sdk-version", "1.4.12")
.header("x-fp-sdk-version", "1.4.13")
publicConfig?.extraHeaders?.let {
for ((key, value) in it) {
builder.header(key,value)
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/sdk/platform/Navigator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,12 @@ enum class Navigator(
pageType = PageType.orderStatus,
navName = "Order status",
link = "/cart/order-status"
),

LOCATE_US(
pageType = PageType.locateUs,
navName = "Locate us",
link = "/locate-us"
)

}
5 changes: 4 additions & 1 deletion src/main/java/com/sdk/platform/PageType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ import android.net.Uri
returnPolicy("return-policy"),

@SerializedName("order-status")
orderStatus("order-status");
orderStatus("order-status"),

@SerializedName("locate-us")
locateUs("locate-us");


companion object {
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/sdk/platform/catalog/CatalogApiList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ interface CatalogApiList {

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/brand")
suspend fun getApplicationBrandListing(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("q") q: String?, @HeaderMap headers: Map<String, String>? = null)
: Response<BrandListingResponse>
: Response<ApplicationBrandListingSchema>

@PATCH ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/brand/{brand_uid}")
suspend fun updateAppBrand(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("brand_uid") brandUid: String,@Body body: ApplicationBrandJson, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/brands")
suspend fun getApplicationBrands(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("department") department: String?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("q") q: String?, @Query("brand_id") brandId: ArrayList<Int>?, @HeaderMap headers: Map<String, String>? = null)
Expand All @@ -31,11 +31,11 @@ interface CatalogApiList {

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/category")
suspend fun getApplicationCategoryListing(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("department_id") departmentId: Int?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("q") q: String?, @HeaderMap headers: Map<String, String>? = null)
: Response<BrandListingResponse>
: Response<ApplicationCategoryListingSchema>

@PATCH ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/category/{category_uid}")
suspend fun updateAppCategory(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("category_uid") categoryUid: String,@Body body: ApplicationCategoryJson, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/collections/")
suspend fun getAllCollections(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("q") q: String?, @Query("schedule_status") scheduleStatus: String?, @Query("type") type: String?, @Query("tags") tags: ArrayList<String>?, @Query("is_active") isActive: Boolean?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @HeaderMap headers: Map<String, String>? = null)
Expand Down Expand Up @@ -83,7 +83,7 @@ interface CatalogApiList {

@PATCH ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/department/{department_uid}")
suspend fun updateAppDepartment(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("department_uid") departmentUid: String,@Body body: ApplicationDepartmentJson, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/departments")
suspend fun getDepartments(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @HeaderMap headers: Map<String, String>? = null)
Expand Down Expand Up @@ -123,7 +123,7 @@ interface CatalogApiList {

@PATCH ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/product/{item_id}/")
suspend fun updateAppProduct(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("item_id") itemId: String,@Body body: ApplicationItemMeta, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@GET ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/products")
suspend fun getAppicationProducts(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("q") q: String?, @Query("f") f: String?, @Query("c") c: String?, @Query("filters") filters: Boolean?, @Query("is_dependent") isDependent: Boolean?, @Query("sort_on") sortOn: String?, @Query("page_id") pageId: String?, @Query("page_size") pageSize: Int?, @Query("page_no") pageNo: Int?, @Query("page_type") pageType: String?, @Query("item_ids") itemIds: ArrayList<Int>?, @HeaderMap headers: Map<String, String>? = null)
Expand All @@ -147,11 +147,11 @@ interface CatalogApiList {

@POST ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/return-config")
suspend fun createAppReturnConfiguration(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: CreateUpdateAppReturnConfig, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@PUT ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/return-config")
suspend fun updateAppReturnConfiguration(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: CreateUpdateAppReturnConfig, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@DELETE ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/return-config/categories")
suspend fun deleteAppCategoryReturnConfiguration(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: DeleteAppCategoryReturnConfig, @HeaderMap headers: Map<String, String>? = null)
Expand All @@ -163,7 +163,7 @@ interface CatalogApiList {

@POST ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/return-config/categories")
suspend fun createAppCategoryReturnConfiguration(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: BaseAppCategoryReturnConfig, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@PUT ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/return-config/categories")
suspend fun updateAppCategoryReturnConfiguration(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: BaseAppCategoryReturnConfig, @HeaderMap headers: Map<String, String>? = null)
Expand Down Expand Up @@ -227,7 +227,7 @@ interface CatalogApiList {

@PATCH ("/service/platform/catalog/v1.0/company/{company_id}/application/{application_id}/store/{store_uid}")
suspend fun updateAppLocation(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("store_uid") storeUid: String,@Body body: ApplicationStoreJson, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@GET ("/service/platform/catalog/v1.0/company/{company_id}/category/")
suspend fun listCategories(@Path("company_id") companyId: String, @Query("level") level: String?, @Query("department") department: Int?, @Query("q") q: String?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("uids") uids: ArrayList<Int>?, @Query("slug") slug: String?, @HeaderMap headers: Map<String, String>? = null)
Expand Down Expand Up @@ -519,7 +519,7 @@ interface CatalogApiList {

@POST ("/service/platform/catalog/v2.0/company/{company_id}/products/")
suspend fun createProduct(@Path("company_id") companyId: String,@Body body: ProductCreateUpdateSchemaV2, @HeaderMap headers: Map<String, String>? = null)
: Response<SuccessResponse1>
: Response<SuccessResponseObject>

@POST ("/service/platform/catalog/v2.0/company/{company_id}/products/bulk")
suspend fun uploadBulkProducts(@Path("company_id") companyId: String, @Query("department") department: String, @Query("product_type") productType: String,@Body body: BulkProductJob, @HeaderMap headers: Map<String, String>? = null)
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/com/sdk/platform/catalog/CatalogDataManagerClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ class CatalogDataManagerClass(val config: PlatformConfig, val unauthorizedAction
}

suspend fun createProduct(body: ProductCreateUpdateSchemaV2, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {

return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.createProduct(
Expand Down Expand Up @@ -1858,7 +1858,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun getApplicationBrandListing(pageNo: Int?=null,pageSize: Int?=null,q: String?=null, headers: Map<String, String> = emptyMap())
: Response<BrandListingResponse>? {
: Response<ApplicationBrandListingSchema>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.getApplicationBrandListing(companyId = config.companyId ,applicationId = applicationId ,pageNo = pageNo,pageSize = pageSize,q = q, headers = headers)
} else {
Expand Down Expand Up @@ -1899,12 +1899,12 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
fun getApplicationBrandListingPaginator(
pageSize: Int?=null, q: String?=null

) : Paginator<BrandListingResponse>{
val paginator = Paginator<BrandListingResponse>()
paginator.setCallBack(object : PaginatorCallback<BrandListingResponse> {
) : Paginator<ApplicationBrandListingSchema>{
val paginator = Paginator<ApplicationBrandListingSchema>()
paginator.setCallBack(object : PaginatorCallback<ApplicationBrandListingSchema> {

override suspend fun onNext(
onResponse: (Event<BrandListingResponse>?,FdkError?) -> Unit){
onResponse: (Event<ApplicationBrandListingSchema>?,FdkError?) -> Unit){

if (config.oauthClient.isAccessTokenValid()) {
val pageId = paginator.nextId
Expand Down Expand Up @@ -1932,7 +1932,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
}

suspend fun updateAppBrand(brandUid: String,body: ApplicationBrandJson, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppBrand(companyId = config.companyId ,applicationId = applicationId ,brandUid = brandUid, body = body,headers = headers)
} else {
Expand Down Expand Up @@ -2036,7 +2036,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun getApplicationCategoryListing(departmentId: Int?=null,pageNo: Int?=null,pageSize: Int?=null,q: String?=null, headers: Map<String, String> = emptyMap())
: Response<BrandListingResponse>? {
: Response<ApplicationCategoryListingSchema>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.getApplicationCategoryListing(companyId = config.companyId ,applicationId = applicationId ,departmentId = departmentId,pageNo = pageNo,pageSize = pageSize,q = q, headers = headers)
} else {
Expand Down Expand Up @@ -2082,12 +2082,12 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
fun getApplicationCategoryListingPaginator(
departmentId: Int?=null, pageSize: Int?=null, q: String?=null

) : Paginator<BrandListingResponse>{
val paginator = Paginator<BrandListingResponse>()
paginator.setCallBack(object : PaginatorCallback<BrandListingResponse> {
) : Paginator<ApplicationCategoryListingSchema>{
val paginator = Paginator<ApplicationCategoryListingSchema>()
paginator.setCallBack(object : PaginatorCallback<ApplicationCategoryListingSchema> {

override suspend fun onNext(
onResponse: (Event<BrandListingResponse>?,FdkError?) -> Unit){
onResponse: (Event<ApplicationCategoryListingSchema>?,FdkError?) -> Unit){

if (config.oauthClient.isAccessTokenValid()) {
val pageId = paginator.nextId
Expand Down Expand Up @@ -2115,7 +2115,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
}

suspend fun updateAppCategory(categoryUid: String,body: ApplicationCategoryJson, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppCategory(companyId = config.companyId ,applicationId = applicationId ,categoryUid = categoryUid, body = body,headers = headers)
} else {
Expand Down Expand Up @@ -2383,7 +2383,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
}

suspend fun updateAppDepartment(departmentUid: String,body: ApplicationDepartmentJson, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppDepartment(companyId = config.companyId ,applicationId = applicationId ,departmentUid = departmentUid, body = body,headers = headers)
} else {
Expand Down Expand Up @@ -2572,7 +2572,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun updateAppProduct(itemId: String,body: ApplicationItemMeta, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppProduct(companyId = config.companyId ,applicationId = applicationId ,itemId = itemId, body = body,headers = headers)
} else {
Expand Down Expand Up @@ -2902,7 +2902,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun createAppReturnConfiguration(body: CreateUpdateAppReturnConfig, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.createAppReturnConfiguration(companyId = config.companyId ,applicationId = applicationId , body = body,headers = headers)
} else {
Expand All @@ -2912,7 +2912,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun updateAppReturnConfiguration(body: CreateUpdateAppReturnConfig, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppReturnConfiguration(companyId = config.companyId ,applicationId = applicationId , body = body,headers = headers)
} else {
Expand Down Expand Up @@ -2942,7 +2942,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun createAppCategoryReturnConfiguration(body: BaseAppCategoryReturnConfig, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.createAppCategoryReturnConfiguration(companyId = config.companyId ,applicationId = applicationId , body = body,headers = headers)
} else {
Expand Down Expand Up @@ -3102,7 +3102,7 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi


suspend fun updateAppLocation(storeUid: String,body: ApplicationStoreJson, headers: Map<String, String> = emptyMap())
: Response<SuccessResponse1>? {
: Response<SuccessResponseObject>? {
return if (config.oauthClient.isAccessTokenValid()) {
catalogApiList?.updateAppLocation(companyId = config.companyId ,applicationId = applicationId ,storeUid = storeUid, body = body,headers = headers)
} else {
Expand Down
Loading

0 comments on commit 1688883

Please sign in to comment.