Skip to content

Commit 9e7b250

Browse files
committed
[Auto Generated] 3.16.1
1 parent b4b727a commit 9e7b250

File tree

10 files changed

+761
-7
lines changed

10 files changed

+761
-7
lines changed

CHANGELOG.md

Lines changed: 512 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Get started with the python Development SDK for Fynd Platform
1414
### Usage
1515

1616
```bash
17-
pip install "git+https://github.com/gofynd/[email protected].0#egg=fdk_client"
17+
pip install "git+https://github.com/gofynd/[email protected].1#egg=fdk_client"
1818
```
1919

2020
Using this method, you can `import` fdk-client-python like so:

fdk_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.16.0"
1+
__version__ = "3.16.1"

fdk_client/application/cart/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,10 @@ class ProductPrice(BaseSchema):
903903

904904
marked = fields.Float(required=False)
905905

906+
final_price = fields.Float(required=False)
907+
908+
discount = fields.Float(required=False)
909+
906910

907911

908912
class ProductPriceInfo(BaseSchema):

fdk_client/platform/cart/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2921,6 +2921,10 @@ class ProductPrice(BaseSchema):
29212921

29222922
selling = fields.Float(required=False)
29232923

2924+
final_price = fields.Float(required=False)
2925+
2926+
discount = fields.Float(required=False)
2927+
29242928

29252929

29262930
class ProductPriceInfo(BaseSchema):

fdk_client/platform/content/applicationClient.py

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,22 +2738,31 @@ async def updateInjectableTag(self, body="", request_headers:Dict={}):
27382738

27392739
return response
27402740

2741-
async def getInjectableTags(self, all=None, request_headers:Dict={}):
2741+
async def getInjectableTags(self, all=None, page_no=None, page_size=None, search=None, request_headers:Dict={}):
27422742
"""Retrieve a list of injectable tags.
27432743
:param all : Get all tags irrespective of the creator of tags : type boolean
2744+
:param page_no : The page number to navigate through the given set of results. Default value is 1. : type integer
2745+
:param page_size : The number of items to retrieve in each page. Default value is 10. : type integer
2746+
:param search : Keyword to filter and find tags by name. : type string
27442747
"""
27452748
payload = {}
27462749

27472750
if all is not None:
27482751
payload["all"] = all
2752+
if page_no is not None:
2753+
payload["page_no"] = page_no
2754+
if page_size is not None:
2755+
payload["page_size"] = page_size
2756+
if search is not None:
2757+
payload["search"] = search
27492758

27502759
# Parameter validation
27512760
schema = ContentValidator.getInjectableTags()
27522761
schema.dump(schema.load(payload))
27532762

27542763

2755-
url_with_params = await create_url_with_params(self._conf.domain, f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags", """{"required":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account on Fynd Platform.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Alphanumeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}],"optional":[{"name":"all","in":"query","description":"Get all tags irrespective of the creator of tags","required":false,"schema":{"type":"boolean","default":false}}],"query":[{"name":"all","in":"query","description":"Get all tags irrespective of the creator of tags","required":false,"schema":{"type":"boolean","default":false}}],"headers":[],"path":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account on Fynd Platform.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Alphanumeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}]}""", serverType="platform", all=all)
2756-
query_string = await create_query_string(all=all)
2764+
url_with_params = await create_url_with_params(self._conf.domain, f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags", """{"required":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account on Fynd Platform.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Alphanumeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}],"optional":[{"name":"all","in":"query","description":"Get all tags irrespective of the creator of tags","required":false,"schema":{"type":"boolean","default":false}},{"name":"page_no","in":"query","description":"The page number to navigate through the given set of results. Default value is 1.","required":false,"schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","description":"The number of items to retrieve in each page. Default value is 10.","required":false,"schema":{"type":"integer","default":10}},{"name":"search","in":"query","description":"Keyword to filter and find tags by name.","required":false,"schema":{"type":"string"}}],"query":[{"name":"all","in":"query","description":"Get all tags irrespective of the creator of tags","required":false,"schema":{"type":"boolean","default":false}},{"name":"page_no","in":"query","description":"The page number to navigate through the given set of results. Default value is 1.","required":false,"schema":{"type":"integer","default":1}},{"name":"page_size","in":"query","description":"The number of items to retrieve in each page. Default value is 10.","required":false,"schema":{"type":"integer","default":10}},{"name":"search","in":"query","description":"Keyword to filter and find tags by name.","required":false,"schema":{"type":"string"}}],"headers":[],"path":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account on Fynd Platform.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Alphanumeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}]}""", serverType="platform", all=all, page_no=page_no, page_size=page_size, search=search)
2765+
query_string = await create_query_string(all=all, page_no=page_no, page_size=page_size, search=search)
27572766
if query_string:
27582767
url_with_params += "?" + query_string
27592768

@@ -2769,7 +2778,7 @@ async def getInjectableTags(self, all=None, request_headers:Dict={}):
27692778
if not key.startswith("x-fp-"):
27702779
exclude_headers.append(key)
27712780

2772-
response = await AiohttpHelper().aiohttp_request("GET", url_with_params, headers=get_headers_with_signature(self._conf.domain, "get", await create_url_without_domain(f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags", all=all), query_string, headers, "", exclude_headers=exclude_headers), data="", debug=(self._conf.logLevel=="DEBUG"))
2781+
response = await AiohttpHelper().aiohttp_request("GET", url_with_params, headers=get_headers_with_signature(self._conf.domain, "get", await create_url_without_domain(f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags", all=all, page_no=page_no, page_size=page_size, search=search), query_string, headers, "", exclude_headers=exclude_headers), data="", debug=(self._conf.logLevel=="DEBUG"))
27732782

27742783
if 200 <= int(response['status_code']) < 300:
27752784
from .models import TagsSchema
@@ -2920,6 +2929,47 @@ async def editInjectableTag(self, tag_id=None, body="", request_headers:Dict={})
29202929

29212930
return response
29222931

2932+
async def getTagsTemplate(self, request_headers:Dict={}):
2933+
"""Retrieve the available script tag templates
2934+
"""
2935+
payload = {}
2936+
2937+
2938+
# Parameter validation
2939+
schema = ContentValidator.getTagsTemplate()
2940+
schema.dump(schema.load(payload))
2941+
2942+
2943+
url_with_params = await create_url_with_params(self._conf.domain, f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags/templates", """{"required":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Numeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}],"optional":[],"query":[],"headers":[],"path":[{"name":"company_id","in":"path","description":"Numeric ID allotted to a business account.","required":true,"schema":{"type":"string"}},{"name":"application_id","in":"path","description":"Numeric ID allotted to an application created within a business account.","required":true,"schema":{"type":"string"}}]}""", serverType="platform", )
2944+
query_string = await create_query_string()
2945+
if query_string:
2946+
url_with_params += "?" + query_string
2947+
2948+
headers = {}
2949+
headers["Authorization"] = f"Bearer {await self._conf.getAccessToken()}"
2950+
for h in self._conf.extraHeaders:
2951+
headers.update(h)
2952+
if request_headers != {}:
2953+
headers.update(request_headers)
2954+
2955+
exclude_headers = []
2956+
for key, val in headers.items():
2957+
if not key.startswith("x-fp-"):
2958+
exclude_headers.append(key)
2959+
2960+
response = await AiohttpHelper().aiohttp_request("GET", url_with_params, headers=get_headers_with_signature(self._conf.domain, "get", await create_url_without_domain(f"/service/platform/content/v1.0/company/{self._conf.companyId}/application/{self.applicationId}/tags/templates", ), query_string, headers, "", exclude_headers=exclude_headers), data="", debug=(self._conf.logLevel=="DEBUG"))
2961+
2962+
if 200 <= int(response['status_code']) < 300:
2963+
from .models import TagsTemplateSchema
2964+
schema = TagsTemplateSchema()
2965+
try:
2966+
schema.load(response["json"])
2967+
except Exception as e:
2968+
print("Response Validation failed for getTagsTemplate")
2969+
print(e)
2970+
2971+
return response
2972+
29232973
async def getBlogBySlug(self, slug=None, request_headers:Dict={}):
29242974
"""Retrieve detailed information about a specific blog using its slug.
29252975
:param slug : A short, human-readable, URL-friendly identifier of a blog page. You can get slug value of a blog from `getBlogs` API. : type string

fdk_client/platform/content/applicationValidator.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@
314314

315315

316316

317+
318+
319+
317320

318321

319322

@@ -331,6 +334,10 @@
331334

332335

333336

337+
338+
339+
340+
334341

335342

336343

@@ -1235,6 +1242,12 @@ class getInjectableTags(BaseSchema):
12351242
application_id = fields.Str(required=False)
12361243

12371244
all = fields.Boolean(required=False)
1245+
1246+
page_no = fields.Int(required=False)
1247+
1248+
page_size = fields.Int(required=False)
1249+
1250+
search = fields.Str(required=False)
12381251

12391252

12401253

@@ -1267,6 +1280,15 @@ class editInjectableTag(BaseSchema):
12671280

12681281

12691282

1283+
class getTagsTemplate(BaseSchema):
1284+
1285+
1286+
company_id = fields.Str(required=False)
1287+
1288+
application_id = fields.Str(required=False)
1289+
1290+
1291+
12701292
class getBlogBySlug(BaseSchema):
12711293

12721294

fdk_client/platform/content/models.py

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ class CreateTagSchema(BaseSchema):
206206
pass
207207

208208

209+
class TemplateSchema(BaseSchema):
210+
pass
211+
212+
213+
class TemplateField(BaseSchema):
214+
pass
215+
216+
209217
class CreateTagRequestSchema(BaseSchema):
210218
pass
211219

@@ -214,6 +222,26 @@ class DataLoaderSchema(BaseSchema):
214222
pass
215223

216224

225+
class TagsTemplateSchema(BaseSchema):
226+
pass
227+
228+
229+
class TagTemplateItem(BaseSchema):
230+
pass
231+
232+
233+
class TemplateLayout(BaseSchema):
234+
pass
235+
236+
237+
class FieldDefinition(BaseSchema):
238+
pass
239+
240+
241+
class FieldValidation(BaseSchema):
242+
pass
243+
244+
217245
class DataLoaderSourceSchema(BaseSchema):
218246
pass
219247

@@ -1463,6 +1491,8 @@ class HandpickedTagSchema(BaseSchema):
14631491

14641492
content = fields.Str(required=False)
14651493

1494+
template = fields.Nested(TemplateSchema, required=False)
1495+
14661496

14671497

14681498
class RemoveHandpickedSchema(BaseSchema):
@@ -1497,6 +1527,30 @@ class CreateTagSchema(BaseSchema):
14971527

14981528
content = fields.Str(required=False)
14991529

1530+
template = fields.Nested(TemplateSchema, required=False)
1531+
1532+
1533+
1534+
class TemplateSchema(BaseSchema):
1535+
# Content swagger.json
1536+
1537+
1538+
template_id = fields.Str(required=False)
1539+
1540+
template_version = fields.Str(required=False)
1541+
1542+
template_fields = fields.List(fields.Nested(TemplateField, required=False), required=False)
1543+
1544+
1545+
1546+
class TemplateField(BaseSchema):
1547+
# Content swagger.json
1548+
1549+
1550+
key = fields.Str(required=False)
1551+
1552+
value = fields.Str(required=False)
1553+
15001554

15011555

15021556
class CreateTagRequestSchema(BaseSchema):
@@ -1529,6 +1583,104 @@ class DataLoaderSchema(BaseSchema):
15291583

15301584

15311585

1586+
class TagsTemplateSchema(BaseSchema):
1587+
# Content swagger.json
1588+
1589+
1590+
items = fields.List(fields.Nested(TagTemplateItem, required=False), required=False)
1591+
1592+
1593+
1594+
class TagTemplateItem(BaseSchema):
1595+
# Content swagger.json
1596+
1597+
1598+
template_name = fields.Str(required=False)
1599+
1600+
type = fields.Str(required=False)
1601+
1602+
sub_type = fields.Str(required=False)
1603+
1604+
position = fields.Str(required=False)
1605+
1606+
pages = fields.List(fields.Str(required=False), required=False)
1607+
1608+
attributes = fields.Dict(required=False)
1609+
1610+
compatible_engines = fields.List(fields.Str(required=False), required=False)
1611+
1612+
field_mappings = fields.Dict(required=False)
1613+
1614+
layout = fields.Nested(TemplateLayout, required=False)
1615+
1616+
name = fields.Str(required=False)
1617+
1618+
path = fields.Str(required=False)
1619+
1620+
description = fields.Str(required=False)
1621+
1622+
image = fields.Str(required=False)
1623+
1624+
note = fields.Str(required=False)
1625+
1626+
template_id = fields.Str(required=False)
1627+
1628+
template_version = fields.Str(required=False)
1629+
1630+
category = fields.Str(required=False)
1631+
1632+
fields = fields.List(fields.Nested(FieldDefinition, required=False), required=False)
1633+
1634+
script = fields.Str(required=False)
1635+
1636+
1637+
1638+
class TemplateLayout(BaseSchema):
1639+
# Content swagger.json
1640+
1641+
1642+
columns = fields.Int(required=False)
1643+
1644+
gap = fields.Str(required=False)
1645+
1646+
responsive = fields.Boolean(required=False)
1647+
1648+
1649+
1650+
class FieldDefinition(BaseSchema):
1651+
# Content swagger.json
1652+
1653+
1654+
name = fields.Str(required=False)
1655+
1656+
type = fields.Str(required=False)
1657+
1658+
label = fields.Str(required=False)
1659+
1660+
placeholder = fields.Str(required=False)
1661+
1662+
required = fields.Boolean(required=False)
1663+
1664+
size = fields.Str(required=False)
1665+
1666+
description = fields.Str(required=False)
1667+
1668+
validation = fields.Nested(FieldValidation, required=False)
1669+
1670+
events = fields.Dict(required=False)
1671+
1672+
1673+
1674+
class FieldValidation(BaseSchema):
1675+
# Content swagger.json
1676+
1677+
1678+
pattern = fields.Str(required=False)
1679+
1680+
message = fields.Str(required=False)
1681+
1682+
1683+
15321684
class DataLoaderSourceSchema(BaseSchema):
15331685
# Content swagger.json
15341686

@@ -2127,8 +2279,12 @@ class TagsSchema(BaseSchema):
21272279

21282280
_id = fields.Str(required=False)
21292281

2282+
company = fields.Str(required=False)
2283+
21302284
tags = fields.List(fields.Nested(TagSchema, required=False), required=False)
21312285

2286+
page = fields.Nested(Page, required=False)
2287+
21322288

21332289

21342290
class TagSchema(BaseSchema):
@@ -2157,6 +2313,8 @@ class TagSchema(BaseSchema):
21572313

21582314
__source = fields.Nested(TagSourceSchema, required=False)
21592315

2316+
template = fields.Nested(TemplateSchema, required=False)
2317+
21602318

21612319

21622320
class TagSourceSchema(BaseSchema):

fdk_client/platform/user/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,10 @@ class UserAttributeFilterQuery(BaseSchema):
959959

960960
email = fields.Str(required=False)
961961

962+
has_email = fields.Boolean(required=False)
963+
964+
has_phone = fields.Boolean(required=False)
965+
962966
phone = fields.Str(required=False)
963967

964968
definition_ids = fields.List(fields.Str(required=False), required=False)

0 commit comments

Comments
 (0)