@gofynd/fdk-client-javascript 1.3.4-beta.1 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/sdk/application/Catalog/CatalogApplicationModel.d.ts +18 -1
- package/sdk/application/Catalog/CatalogApplicationModel.js +20 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +3 -3
- package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +23 -9
- package/sdk/application/FileStorage/FileStorageApplicationModel.js +21 -7
- package/sdk/application/User/UserApplicationClient.d.ts +56 -0
- package/sdk/application/User/UserApplicationClient.js +385 -0
- package/sdk/application/User/UserApplicationModel.d.ts +93 -1
- package/sdk/application/User/UserApplicationModel.js +110 -0
- package/sdk/application/User/UserApplicationValidator.d.ts +66 -1
- package/sdk/application/User/UserApplicationValidator.js +68 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +96 -0
- package/sdk/partner/FileStorage/FileStoragePartnerClient.js +177 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +139 -0
- package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +6 -0
- package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +33 -0
- package/sdk/partner/PartnerClient.d.ts +2 -0
- package/sdk/partner/PartnerClient.js +3 -0
- package/sdk/partner/index.d.ts +1 -0
- package/sdk/partner/index.js +2 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +4 -16
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +11 -79
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +12 -8
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +7 -9
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +37 -27
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +145 -56
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +22 -11
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +24 -10
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +4 -4
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +4 -8
- package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +832 -150
- package/sdk/platform/FileStorage/FileStoragePlatformModel.js +940 -138
- package/sdk/platform/Order/OrderPlatformClient.d.ts +2 -2
- package/sdk/platform/Order/OrderPlatformClient.js +1 -1
- package/sdk/platform/Order/OrderPlatformModel.d.ts +10 -2
- package/sdk/platform/Order/OrderPlatformModel.js +10 -2
- package/sdk/platform/Order/OrderPlatformValidator.d.ts +4 -4
- package/sdk/platform/Order/OrderPlatformValidator.js +4 -4
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +42 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +241 -0
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +41 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +40 -0
- package/sdk/platform/Payment/PaymentPlatformModel.d.ts +72 -1
- package/sdk/platform/Payment/PaymentPlatformModel.js +54 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export = FileStoragePartnerModel;
|
|
2
|
+
/**
|
|
3
|
+
* @typedef CDN
|
|
4
|
+
* @property {string} absolute_url
|
|
5
|
+
* @property {string} relative_url
|
|
6
|
+
* @property {string} url
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @typedef CompleteResponse
|
|
10
|
+
* @property {string} _id
|
|
11
|
+
* @property {CDN} cdn
|
|
12
|
+
* @property {string} content_type
|
|
13
|
+
* @property {CreatedBy} [created_by]
|
|
14
|
+
* @property {string} created_on
|
|
15
|
+
* @property {string} file_name
|
|
16
|
+
* @property {string} file_path
|
|
17
|
+
* @property {string} modified_on
|
|
18
|
+
* @property {string} namespace
|
|
19
|
+
* @property {string} operation
|
|
20
|
+
* @property {number} size
|
|
21
|
+
* @property {boolean} success
|
|
22
|
+
* @property {string[]} [tags]
|
|
23
|
+
* @property {Upload} upload
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* @typedef CreatedBy
|
|
27
|
+
* @property {string} [username]
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* @typedef FailedResponse
|
|
31
|
+
* @property {string} message
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* @typedef Params
|
|
35
|
+
* @property {string} [subpath] - The subpath for the file.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* @typedef StartRequest
|
|
39
|
+
* @property {string} content_type
|
|
40
|
+
* @property {string} file_name
|
|
41
|
+
* @property {Params} [params]
|
|
42
|
+
* @property {number} size
|
|
43
|
+
* @property {string[]} [tags]
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* @typedef StartResponse
|
|
47
|
+
* @property {CDN} cdn
|
|
48
|
+
* @property {string} content_type
|
|
49
|
+
* @property {string} file_name
|
|
50
|
+
* @property {string} file_path
|
|
51
|
+
* @property {string} [method]
|
|
52
|
+
* @property {string} namespace
|
|
53
|
+
* @property {string} operation
|
|
54
|
+
* @property {number} size
|
|
55
|
+
* @property {string[]} [tags]
|
|
56
|
+
* @property {Upload} upload
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* @typedef Upload
|
|
60
|
+
* @property {number} expiry
|
|
61
|
+
* @property {string} url
|
|
62
|
+
*/
|
|
63
|
+
declare class FileStoragePartnerModel {
|
|
64
|
+
}
|
|
65
|
+
declare namespace FileStoragePartnerModel {
|
|
66
|
+
export { CDN, CompleteResponse, CreatedBy, FailedResponse, Params, StartRequest, StartResponse, Upload };
|
|
67
|
+
}
|
|
68
|
+
/** @returns {CDN} */
|
|
69
|
+
declare function CDN(): CDN;
|
|
70
|
+
type CDN = {
|
|
71
|
+
absolute_url: string;
|
|
72
|
+
relative_url: string;
|
|
73
|
+
url: string;
|
|
74
|
+
};
|
|
75
|
+
/** @returns {CompleteResponse} */
|
|
76
|
+
declare function CompleteResponse(): CompleteResponse;
|
|
77
|
+
type CompleteResponse = {
|
|
78
|
+
_id: string;
|
|
79
|
+
cdn: CDN;
|
|
80
|
+
content_type: string;
|
|
81
|
+
created_by?: CreatedBy;
|
|
82
|
+
created_on: string;
|
|
83
|
+
file_name: string;
|
|
84
|
+
file_path: string;
|
|
85
|
+
modified_on: string;
|
|
86
|
+
namespace: string;
|
|
87
|
+
operation: string;
|
|
88
|
+
size: number;
|
|
89
|
+
success: boolean;
|
|
90
|
+
tags?: string[];
|
|
91
|
+
upload: Upload;
|
|
92
|
+
};
|
|
93
|
+
/** @returns {CreatedBy} */
|
|
94
|
+
declare function CreatedBy(): CreatedBy;
|
|
95
|
+
type CreatedBy = {
|
|
96
|
+
username?: string;
|
|
97
|
+
};
|
|
98
|
+
/** @returns {FailedResponse} */
|
|
99
|
+
declare function FailedResponse(): FailedResponse;
|
|
100
|
+
type FailedResponse = {
|
|
101
|
+
message: string;
|
|
102
|
+
};
|
|
103
|
+
/** @returns {Params} */
|
|
104
|
+
declare function Params(): Params;
|
|
105
|
+
type Params = {
|
|
106
|
+
/**
|
|
107
|
+
* - The subpath for the file.
|
|
108
|
+
*/
|
|
109
|
+
subpath?: string;
|
|
110
|
+
};
|
|
111
|
+
/** @returns {StartRequest} */
|
|
112
|
+
declare function StartRequest(): StartRequest;
|
|
113
|
+
type StartRequest = {
|
|
114
|
+
content_type: string;
|
|
115
|
+
file_name: string;
|
|
116
|
+
params?: Params;
|
|
117
|
+
size: number;
|
|
118
|
+
tags?: string[];
|
|
119
|
+
};
|
|
120
|
+
/** @returns {StartResponse} */
|
|
121
|
+
declare function StartResponse(): StartResponse;
|
|
122
|
+
type StartResponse = {
|
|
123
|
+
cdn: CDN;
|
|
124
|
+
content_type: string;
|
|
125
|
+
file_name: string;
|
|
126
|
+
file_path: string;
|
|
127
|
+
method?: string;
|
|
128
|
+
namespace: string;
|
|
129
|
+
operation: string;
|
|
130
|
+
size: number;
|
|
131
|
+
tags?: string[];
|
|
132
|
+
upload: Upload;
|
|
133
|
+
};
|
|
134
|
+
/** @returns {Upload} */
|
|
135
|
+
declare function Upload(): Upload;
|
|
136
|
+
type Upload = {
|
|
137
|
+
expiry: number;
|
|
138
|
+
url: string;
|
|
139
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @typedef CDN
|
|
5
|
+
* @property {string} absolute_url
|
|
6
|
+
* @property {string} relative_url
|
|
7
|
+
* @property {string} url
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef CompleteResponse
|
|
12
|
+
* @property {string} _id
|
|
13
|
+
* @property {CDN} cdn
|
|
14
|
+
* @property {string} content_type
|
|
15
|
+
* @property {CreatedBy} [created_by]
|
|
16
|
+
* @property {string} created_on
|
|
17
|
+
* @property {string} file_name
|
|
18
|
+
* @property {string} file_path
|
|
19
|
+
* @property {string} modified_on
|
|
20
|
+
* @property {string} namespace
|
|
21
|
+
* @property {string} operation
|
|
22
|
+
* @property {number} size
|
|
23
|
+
* @property {boolean} success
|
|
24
|
+
* @property {string[]} [tags]
|
|
25
|
+
* @property {Upload} upload
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @typedef CreatedBy
|
|
30
|
+
* @property {string} [username]
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @typedef FailedResponse
|
|
35
|
+
* @property {string} message
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @typedef Params
|
|
40
|
+
* @property {string} [subpath] - The subpath for the file.
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @typedef StartRequest
|
|
45
|
+
* @property {string} content_type
|
|
46
|
+
* @property {string} file_name
|
|
47
|
+
* @property {Params} [params]
|
|
48
|
+
* @property {number} size
|
|
49
|
+
* @property {string[]} [tags]
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @typedef StartResponse
|
|
54
|
+
* @property {CDN} cdn
|
|
55
|
+
* @property {string} content_type
|
|
56
|
+
* @property {string} file_name
|
|
57
|
+
* @property {string} file_path
|
|
58
|
+
* @property {string} [method]
|
|
59
|
+
* @property {string} namespace
|
|
60
|
+
* @property {string} operation
|
|
61
|
+
* @property {number} size
|
|
62
|
+
* @property {string[]} [tags]
|
|
63
|
+
* @property {Upload} upload
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @typedef Upload
|
|
68
|
+
* @property {number} expiry
|
|
69
|
+
* @property {string} url
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
class FileStoragePartnerModel {
|
|
73
|
+
/** @returns {CDN} */
|
|
74
|
+
static CDN() {
|
|
75
|
+
return Joi.object({
|
|
76
|
+
absolute_url: Joi.string().allow("").required(),
|
|
77
|
+
relative_url: Joi.string().allow("").required(),
|
|
78
|
+
url: Joi.string().allow("").required(),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @returns {CompleteResponse} */
|
|
83
|
+
static CompleteResponse() {
|
|
84
|
+
return Joi.object({
|
|
85
|
+
_id: Joi.string().allow("").required(),
|
|
86
|
+
cdn: FileStoragePartnerModel.CDN().required(),
|
|
87
|
+
content_type: Joi.string().allow("").required(),
|
|
88
|
+
created_by: FileStoragePartnerModel.CreatedBy(),
|
|
89
|
+
created_on: Joi.string().allow("").required(),
|
|
90
|
+
file_name: Joi.string().allow("").required(),
|
|
91
|
+
file_path: Joi.string().allow("").required(),
|
|
92
|
+
modified_on: Joi.string().allow("").required(),
|
|
93
|
+
namespace: Joi.string().allow("").required(),
|
|
94
|
+
operation: Joi.string().allow("").required(),
|
|
95
|
+
size: Joi.number().required(),
|
|
96
|
+
success: Joi.boolean().required(),
|
|
97
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
98
|
+
upload: FileStoragePartnerModel.Upload().required(),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @returns {CreatedBy} */
|
|
103
|
+
static CreatedBy() {
|
|
104
|
+
return Joi.object({
|
|
105
|
+
username: Joi.string().allow(""),
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @returns {FailedResponse} */
|
|
110
|
+
static FailedResponse() {
|
|
111
|
+
return Joi.object({
|
|
112
|
+
message: Joi.string().allow("").required(),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** @returns {Params} */
|
|
117
|
+
static Params() {
|
|
118
|
+
return Joi.object({
|
|
119
|
+
subpath: Joi.string().allow(""),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** @returns {StartRequest} */
|
|
124
|
+
static StartRequest() {
|
|
125
|
+
return Joi.object({
|
|
126
|
+
content_type: Joi.string().allow("").required(),
|
|
127
|
+
file_name: Joi.string().allow("").required(),
|
|
128
|
+
params: FileStoragePartnerModel.Params(),
|
|
129
|
+
size: Joi.number().required(),
|
|
130
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/** @returns {StartResponse} */
|
|
135
|
+
static StartResponse() {
|
|
136
|
+
return Joi.object({
|
|
137
|
+
cdn: FileStoragePartnerModel.CDN().required(),
|
|
138
|
+
content_type: Joi.string().allow("").required(),
|
|
139
|
+
file_name: Joi.string().allow("").required(),
|
|
140
|
+
file_path: Joi.string().allow("").required(),
|
|
141
|
+
method: Joi.string().allow(""),
|
|
142
|
+
namespace: Joi.string().allow("").required(),
|
|
143
|
+
operation: Joi.string().allow("").required(),
|
|
144
|
+
size: Joi.number().required(),
|
|
145
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
146
|
+
upload: FileStoragePartnerModel.Upload().required(),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** @returns {Upload} */
|
|
151
|
+
static Upload() {
|
|
152
|
+
return Joi.object({
|
|
153
|
+
expiry: Joi.number().required(),
|
|
154
|
+
url: Joi.string().allow("").required(),
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
module.exports = FileStoragePartnerModel;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const Joi = require("joi");
|
|
2
|
+
|
|
3
|
+
const FileStorageModel = require("./FileStoragePartnerModel");
|
|
4
|
+
class FileStorageValidator {
|
|
5
|
+
static startUpload() {
|
|
6
|
+
return Joi.object({
|
|
7
|
+
namespace: Joi.string().allow("").required(),
|
|
8
|
+
|
|
9
|
+
body: FileStorageModel.StartRequest().required(),
|
|
10
|
+
}).required();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static completeUpload() {
|
|
14
|
+
return Joi.object({
|
|
15
|
+
namespace: Joi.string().allow("").required(),
|
|
16
|
+
|
|
17
|
+
body: FileStorageModel.StartResponse().required(),
|
|
18
|
+
}).required();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static browse() {
|
|
22
|
+
return Joi.object({
|
|
23
|
+
namespace: Joi.string().allow("").required(),
|
|
24
|
+
|
|
25
|
+
applicationId: Joi.string().allow("").required(),
|
|
26
|
+
companyId: Joi.number().required(),
|
|
27
|
+
page: Joi.number(),
|
|
28
|
+
limit: Joi.number(),
|
|
29
|
+
}).required();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
module.exports = FileStorageValidator;
|
|
@@ -13,6 +13,7 @@ declare class PartnerClient {
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(config: import("./PartnerConfig"));
|
|
15
15
|
config: import("./PartnerConfig");
|
|
16
|
+
fileStorage: FileStorage;
|
|
16
17
|
theme: Theme;
|
|
17
18
|
/**
|
|
18
19
|
* Sets the extra headers for the partner client.
|
|
@@ -22,4 +23,5 @@ declare class PartnerClient {
|
|
|
22
23
|
*/
|
|
23
24
|
setExtraHeaders(header: object): void;
|
|
24
25
|
}
|
|
26
|
+
import FileStorage = require("./FileStorage/FileStoragePartnerClient");
|
|
25
27
|
import Theme = require("./Theme/ThemePartnerClient");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const FileStorage = require("./FileStorage/FileStoragePartnerClient");
|
|
2
|
+
|
|
1
3
|
const Theme = require("./Theme/ThemePartnerClient");
|
|
2
4
|
|
|
3
5
|
const { FDKClientValidationError } = require("../common/FDKError");
|
|
@@ -16,6 +18,7 @@ class PartnerClient {
|
|
|
16
18
|
*/
|
|
17
19
|
constructor(config) {
|
|
18
20
|
this.config = config;
|
|
21
|
+
this.fileStorage = new FileStorage(config);
|
|
19
22
|
this.theme = new Theme(config);
|
|
20
23
|
}
|
|
21
24
|
|
package/sdk/partner/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const PartnerConfig: typeof import("./PartnerConfig");
|
|
2
2
|
export const PartnerClient: typeof import("./PartnerClient");
|
|
3
3
|
export namespace PartnerModel {
|
|
4
|
+
const FileStoragePartnerModel: typeof import("./FileStorage/FileStoragePartnerModel");
|
|
4
5
|
const ThemePartnerModel: typeof import("./Theme/ThemePartnerModel");
|
|
5
6
|
}
|
package/sdk/partner/index.js
CHANGED
|
@@ -2,6 +2,8 @@ module.exports = {
|
|
|
2
2
|
PartnerConfig: require("./PartnerConfig"),
|
|
3
3
|
PartnerClient: require("./PartnerClient"),
|
|
4
4
|
PartnerModel: {
|
|
5
|
+
FileStoragePartnerModel: require("./FileStorage/FileStoragePartnerModel"),
|
|
6
|
+
|
|
5
7
|
ThemePartnerModel: require("./Theme/ThemePartnerModel"),
|
|
6
8
|
},
|
|
7
9
|
};
|
|
@@ -135,18 +135,6 @@ declare class Content {
|
|
|
135
135
|
* @description: A slideshow is a group of images, videos or a combination of both that are shown on the website in the form of slides. Use this API to create a slideshow. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/createSlideshow/).
|
|
136
136
|
*/
|
|
137
137
|
createSlideshow({ body, requestHeaders }?: ContentPlatformApplicationValidator.CreateSlideshowParam, { responseHeaders }?: object): Promise<ContentPlatformModel.SlideshowSchema>;
|
|
138
|
-
/**
|
|
139
|
-
* @param {ContentPlatformApplicationValidator.DeleteAllInjectableTagsParam} arg
|
|
140
|
-
* - Arg object
|
|
141
|
-
*
|
|
142
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
143
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
144
|
-
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
145
|
-
* @name deleteAllInjectableTags
|
|
146
|
-
* @summary: Delete tags in application
|
|
147
|
-
* @description: Use this API to delete all the existing tags at once. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAllInjectableTags/).
|
|
148
|
-
*/
|
|
149
|
-
deleteAllInjectableTags({ requestHeaders }?: any, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
|
|
150
138
|
/**
|
|
151
139
|
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
152
140
|
* - Arg object
|
|
@@ -456,9 +444,9 @@ declare class Content {
|
|
|
456
444
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
457
445
|
* @name getInjectableTags
|
|
458
446
|
* @summary: Get all the tags in an application
|
|
459
|
-
* @description: Use this API to get
|
|
447
|
+
* @description: Use this API to get the CSS and JS injected in the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getInjectableTags/).
|
|
460
448
|
*/
|
|
461
|
-
getInjectableTags({ requestHeaders }?:
|
|
449
|
+
getInjectableTags({ all, requestHeaders }?: ContentPlatformApplicationValidator.GetInjectableTagsParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
|
|
462
450
|
/**
|
|
463
451
|
* @param {ContentPlatformApplicationValidator.GetLandingPagesParam} arg - Arg object
|
|
464
452
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -788,8 +776,8 @@ declare class Content {
|
|
|
788
776
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
789
777
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
790
778
|
* @name updateInjectableTag
|
|
791
|
-
* @summary: Update
|
|
792
|
-
* @description: Use this API to edit
|
|
779
|
+
* @summary: Update the exisitng tags for an application by replacing with provided tags
|
|
780
|
+
* @description: Use this API to edit and override all existing tags. All existing tags will be replaced by the new tags provided in body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateInjectableTag/).
|
|
793
781
|
*/
|
|
794
782
|
updateInjectableTag({ body, requestHeaders }?: ContentPlatformApplicationValidator.UpdateInjectableTagParam, { responseHeaders }?: object): Promise<ContentPlatformModel.TagsSchema>;
|
|
795
783
|
/**
|
|
@@ -920,79 +920,6 @@ class Content {
|
|
|
920
920
|
return response;
|
|
921
921
|
}
|
|
922
922
|
|
|
923
|
-
/**
|
|
924
|
-
* @param {ContentPlatformApplicationValidator.DeleteAllInjectableTagsParam} arg
|
|
925
|
-
* - Arg object
|
|
926
|
-
*
|
|
927
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
928
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
929
|
-
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
930
|
-
* @name deleteAllInjectableTags
|
|
931
|
-
* @summary: Delete tags in application
|
|
932
|
-
* @description: Use this API to delete all the existing tags at once. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/deleteAllInjectableTags/).
|
|
933
|
-
*/
|
|
934
|
-
async deleteAllInjectableTags(
|
|
935
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
936
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
937
|
-
) {
|
|
938
|
-
const {
|
|
939
|
-
error,
|
|
940
|
-
} = ContentPlatformApplicationValidator.deleteAllInjectableTags().validate(
|
|
941
|
-
{},
|
|
942
|
-
{ abortEarly: false, allowUnknown: true }
|
|
943
|
-
);
|
|
944
|
-
if (error) {
|
|
945
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
// Showing warrnings if extra unknown parameters are found
|
|
949
|
-
const {
|
|
950
|
-
error: warrning,
|
|
951
|
-
} = ContentPlatformApplicationValidator.deleteAllInjectableTags().validate(
|
|
952
|
-
{},
|
|
953
|
-
{ abortEarly: false, allowUnknown: false }
|
|
954
|
-
);
|
|
955
|
-
if (warrning) {
|
|
956
|
-
Logger({
|
|
957
|
-
level: "WARN",
|
|
958
|
-
message: `Parameter Validation warrnings for platform > Content > deleteAllInjectableTags \n ${warrning}`,
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
const query_params = {};
|
|
963
|
-
|
|
964
|
-
const response = await PlatformAPIClient.execute(
|
|
965
|
-
this.config,
|
|
966
|
-
"delete",
|
|
967
|
-
`/service/platform/content/v1.0/company/${this.config.companyId}/application/${this.applicationId}/tags`,
|
|
968
|
-
query_params,
|
|
969
|
-
undefined,
|
|
970
|
-
requestHeaders,
|
|
971
|
-
{ responseHeaders }
|
|
972
|
-
);
|
|
973
|
-
|
|
974
|
-
let responseData = response;
|
|
975
|
-
if (responseHeaders) {
|
|
976
|
-
responseData = response[0];
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
const {
|
|
980
|
-
error: res_error,
|
|
981
|
-
} = ContentPlatformModel.TagsSchema().validate(responseData, {
|
|
982
|
-
abortEarly: false,
|
|
983
|
-
allowUnknown: false,
|
|
984
|
-
});
|
|
985
|
-
|
|
986
|
-
if (res_error) {
|
|
987
|
-
Logger({
|
|
988
|
-
level: "WARN",
|
|
989
|
-
message: `Response Validation Warnnings for platform > Content > deleteAllInjectableTags \n ${res_error}`,
|
|
990
|
-
});
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
return response;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
923
|
/**
|
|
997
924
|
* @param {ContentPlatformApplicationValidator.DeleteAnnouncementParam} arg
|
|
998
925
|
* - Arg object
|
|
@@ -2890,16 +2817,18 @@ class Content {
|
|
|
2890
2817
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
2891
2818
|
* @name getInjectableTags
|
|
2892
2819
|
* @summary: Get all the tags in an application
|
|
2893
|
-
* @description: Use this API to get
|
|
2820
|
+
* @description: Use this API to get the CSS and JS injected in the application in the form of tags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/getInjectableTags/).
|
|
2894
2821
|
*/
|
|
2895
2822
|
async getInjectableTags(
|
|
2896
|
-
{ requestHeaders } = { requestHeaders: {} },
|
|
2823
|
+
{ all, requestHeaders } = { requestHeaders: {} },
|
|
2897
2824
|
{ responseHeaders } = { responseHeaders: false }
|
|
2898
2825
|
) {
|
|
2899
2826
|
const {
|
|
2900
2827
|
error,
|
|
2901
2828
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
2902
|
-
{
|
|
2829
|
+
{
|
|
2830
|
+
all,
|
|
2831
|
+
},
|
|
2903
2832
|
{ abortEarly: false, allowUnknown: true }
|
|
2904
2833
|
);
|
|
2905
2834
|
if (error) {
|
|
@@ -2910,7 +2839,9 @@ class Content {
|
|
|
2910
2839
|
const {
|
|
2911
2840
|
error: warrning,
|
|
2912
2841
|
} = ContentPlatformApplicationValidator.getInjectableTags().validate(
|
|
2913
|
-
{
|
|
2842
|
+
{
|
|
2843
|
+
all,
|
|
2844
|
+
},
|
|
2914
2845
|
{ abortEarly: false, allowUnknown: false }
|
|
2915
2846
|
);
|
|
2916
2847
|
if (warrning) {
|
|
@@ -2921,6 +2852,7 @@ class Content {
|
|
|
2921
2852
|
}
|
|
2922
2853
|
|
|
2923
2854
|
const query_params = {};
|
|
2855
|
+
query_params["all"] = all;
|
|
2924
2856
|
|
|
2925
2857
|
const response = await PlatformAPIClient.execute(
|
|
2926
2858
|
this.config,
|
|
@@ -4815,8 +4747,8 @@ class Content {
|
|
|
4815
4747
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
4816
4748
|
* @returns {Promise<ContentPlatformModel.TagsSchema>} - Success response
|
|
4817
4749
|
* @name updateInjectableTag
|
|
4818
|
-
* @summary: Update
|
|
4819
|
-
* @description: Use this API to edit
|
|
4750
|
+
* @summary: Update the exisitng tags for an application by replacing with provided tags
|
|
4751
|
+
* @description: Use this API to edit and override all existing tags. All existing tags will be replaced by the new tags provided in body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/content/updateInjectableTag/).
|
|
4820
4752
|
*/
|
|
4821
4753
|
async updateInjectableTag(
|
|
4822
4754
|
{ body, requestHeaders } = { requestHeaders: {} },
|
|
@@ -48,7 +48,6 @@ export = ContentPlatformApplicationValidator;
|
|
|
48
48
|
* @typedef CreateSlideshowParam
|
|
49
49
|
* @property {ContentPlatformModel.SlideshowRequest} body
|
|
50
50
|
*/
|
|
51
|
-
/** @typedef DeleteAllInjectableTagsParam */
|
|
52
51
|
/**
|
|
53
52
|
* @typedef DeleteAnnouncementParam
|
|
54
53
|
* @property {string} announcementId - ID allotted to the announcement.
|
|
@@ -156,7 +155,10 @@ export = ContentPlatformApplicationValidator;
|
|
|
156
155
|
* Slug is a short, human-readable, URL-friendly identifier of an object. You
|
|
157
156
|
* can get slug value of an FAQ category from `getFaqCategories` API.
|
|
158
157
|
*/
|
|
159
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* @typedef GetInjectableTagsParam
|
|
160
|
+
* @property {boolean} [all] - Get all tags irrespective of the creator of tags
|
|
161
|
+
*/
|
|
160
162
|
/**
|
|
161
163
|
* @typedef GetLandingPagesParam
|
|
162
164
|
* @property {number} [pageNo] - The page number to navigate through the given
|
|
@@ -335,8 +337,6 @@ declare class ContentPlatformApplicationValidator {
|
|
|
335
337
|
static createPagePreview(): CreatePagePreviewParam;
|
|
336
338
|
/** @returns {CreateSlideshowParam} */
|
|
337
339
|
static createSlideshow(): CreateSlideshowParam;
|
|
338
|
-
/** @returns {DeleteAllInjectableTagsParam} */
|
|
339
|
-
static deleteAllInjectableTags(): any;
|
|
340
340
|
/** @returns {DeleteAnnouncementParam} */
|
|
341
341
|
static deleteAnnouncement(): DeleteAnnouncementParam;
|
|
342
342
|
/** @returns {DeleteBlogParam} */
|
|
@@ -386,7 +386,7 @@ declare class ContentPlatformApplicationValidator {
|
|
|
386
386
|
/** @returns {GetFaqsByCategoryIdOrSlugParam} */
|
|
387
387
|
static getFaqsByCategoryIdOrSlug(): GetFaqsByCategoryIdOrSlugParam;
|
|
388
388
|
/** @returns {GetInjectableTagsParam} */
|
|
389
|
-
static getInjectableTags():
|
|
389
|
+
static getInjectableTags(): GetInjectableTagsParam;
|
|
390
390
|
/** @returns {GetLandingPagesParam} */
|
|
391
391
|
static getLandingPages(): GetLandingPagesParam;
|
|
392
392
|
/** @returns {GetLegalInformationParam} */
|
|
@@ -453,7 +453,7 @@ declare class ContentPlatformApplicationValidator {
|
|
|
453
453
|
static updateSupportInformation(): UpdateSupportInformationParam;
|
|
454
454
|
}
|
|
455
455
|
declare namespace ContentPlatformApplicationValidator {
|
|
456
|
-
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSlideshowParam,
|
|
456
|
+
export { AddDataLoaderParam, AddFaqParam, AddInjectableTagParam, AddPathRedirectionRulesParam, CreateAnnouncementParam, CreateBlogParam, CreateFaqCategoryParam, CreateLandingPageParam, CreateNavigationParam, CreatePageParam, CreatePagePreviewParam, CreateSlideshowParam, DeleteAnnouncementParam, DeleteBlogParam, DeleteDataLoaderParam, DeleteFaqParam, DeleteFaqCategoryParam, DeleteLandingPageParam, DeleteNavigationParam, DeletePageParam, DeletePathRedirectionRulesParam, DeleteSlideshowParam, EditDataLoaderParam, EditInjectableTagParam, GenerateSEOTitleParam, GetAnnouncementByIdParam, GetAnnouncementsListParam, GetBlogBySlugParam, GetBlogsParam, GetComponentByIdParam, GetDataLoadersParam, GetDefaultNavigationsParam, GetFaqByIdOrSlugParam, GetFaqCategoriesParam, GetFaqCategoryBySlugOrIdParam, GetFaqsByCategoryIdOrSlugParam, GetInjectableTagsParam, GetLandingPagesParam, GetLegalInformationParam, GetNavigationBySlugParam, GetNavigationsParam, GetPageBySlugParam, GetPageMetaParam, GetPageSpecParam, GetPagesParam, GetPathRedirectionRuleParam, GetPathRedirectionRulesParam, GetSEOConfigurationParam, GetSlideshowBySlugParam, GetSlideshowsParam, GetSupportInformationParam, RemoveInjectableTagParam, ResetDataLoaderParam, SelectDataLoaderParam, UpdateAnnouncementParam, UpdateAnnouncementScheduleParam, UpdateBlogParam, UpdateFaqParam, UpdateFaqCategoryParam, UpdateInjectableTagParam, UpdateLandingPageParam, UpdateLegalInformationParam, UpdateNavigationParam, UpdatePageParam, UpdatePagePreviewParam, UpdatePathRedirectionRulesParam, UpdateSEOConfigurationParam, UpdateSlideshowParam, UpdateSupportInformationParam };
|
|
457
457
|
}
|
|
458
458
|
type AddDataLoaderParam = {
|
|
459
459
|
body: ContentPlatformModel.DataLoaderSchema;
|
|
@@ -650,6 +650,12 @@ type GetFaqsByCategoryIdOrSlugParam = {
|
|
|
650
650
|
*/
|
|
651
651
|
idOrSlug: string;
|
|
652
652
|
};
|
|
653
|
+
type GetInjectableTagsParam = {
|
|
654
|
+
/**
|
|
655
|
+
* - Get all tags irrespective of the creator of tags
|
|
656
|
+
*/
|
|
657
|
+
all?: boolean;
|
|
658
|
+
};
|
|
653
659
|
type GetLandingPagesParam = {
|
|
654
660
|
/**
|
|
655
661
|
* - The page number to navigate through the given
|
|
@@ -870,11 +876,9 @@ type UpdateSlideshowParam = {
|
|
|
870
876
|
type UpdateSupportInformationParam = {
|
|
871
877
|
body: ContentPlatformModel.Support;
|
|
872
878
|
};
|
|
873
|
-
type DeleteAllInjectableTagsParam = any;
|
|
874
879
|
type GetDataLoadersParam = any;
|
|
875
880
|
type GetDefaultNavigationsParam = any;
|
|
876
881
|
type GetFaqCategoriesParam = any;
|
|
877
|
-
type GetInjectableTagsParam = any;
|
|
878
882
|
type GetLegalInformationParam = any;
|
|
879
883
|
type GetPageMetaParam = any;
|
|
880
884
|
type GetPageSpecParam = any;
|
|
@@ -63,8 +63,6 @@ const ContentPlatformModel = require("./ContentPlatformModel");
|
|
|
63
63
|
* @property {ContentPlatformModel.SlideshowRequest} body
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
|
-
/** @typedef DeleteAllInjectableTagsParam */
|
|
67
|
-
|
|
68
66
|
/**
|
|
69
67
|
* @typedef DeleteAnnouncementParam
|
|
70
68
|
* @property {string} announcementId - ID allotted to the announcement.
|
|
@@ -196,7 +194,10 @@ const ContentPlatformModel = require("./ContentPlatformModel");
|
|
|
196
194
|
* can get slug value of an FAQ category from `getFaqCategories` API.
|
|
197
195
|
*/
|
|
198
196
|
|
|
199
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* @typedef GetInjectableTagsParam
|
|
199
|
+
* @property {boolean} [all] - Get all tags irrespective of the creator of tags
|
|
200
|
+
*/
|
|
200
201
|
|
|
201
202
|
/**
|
|
202
203
|
* @typedef GetLandingPagesParam
|
|
@@ -469,11 +470,6 @@ class ContentPlatformApplicationValidator {
|
|
|
469
470
|
}).required();
|
|
470
471
|
}
|
|
471
472
|
|
|
472
|
-
/** @returns {DeleteAllInjectableTagsParam} */
|
|
473
|
-
static deleteAllInjectableTags() {
|
|
474
|
-
return Joi.object({}).required();
|
|
475
|
-
}
|
|
476
|
-
|
|
477
473
|
/** @returns {DeleteAnnouncementParam} */
|
|
478
474
|
static deleteAnnouncement() {
|
|
479
475
|
return Joi.object({
|
|
@@ -644,7 +640,9 @@ class ContentPlatformApplicationValidator {
|
|
|
644
640
|
|
|
645
641
|
/** @returns {GetInjectableTagsParam} */
|
|
646
642
|
static getInjectableTags() {
|
|
647
|
-
return Joi.object({
|
|
643
|
+
return Joi.object({
|
|
644
|
+
all: Joi.boolean(),
|
|
645
|
+
}).required();
|
|
648
646
|
}
|
|
649
647
|
|
|
650
648
|
/** @returns {GetLandingPagesParam} */
|