@rezamirzapour/pod-sdk 1.0.9 → 1.0.11
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/dist/index.d.mts +73 -37
- package/dist/index.d.ts +73 -37
- package/dist/index.js +607 -57
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +604 -58
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -2
package/dist/index.mjs
CHANGED
|
@@ -255,10 +255,8 @@ var SsoService = class {
|
|
|
255
255
|
var CaptchaService = class {
|
|
256
256
|
http;
|
|
257
257
|
clientId;
|
|
258
|
-
accessToken;
|
|
259
258
|
constructor(options) {
|
|
260
259
|
this.clientId = options.clientId;
|
|
261
|
-
this.accessToken = options.accessToken;
|
|
262
260
|
this.http = createNextHttp({
|
|
263
261
|
baseUrl: options.baseUrl,
|
|
264
262
|
serviceName: "POD-CAPTCHA"
|
|
@@ -267,71 +265,66 @@ var CaptchaService = class {
|
|
|
267
265
|
/**
|
|
268
266
|
* Get a new captcha image
|
|
269
267
|
*/
|
|
270
|
-
async get(
|
|
268
|
+
async get() {
|
|
271
269
|
const params = {};
|
|
272
|
-
if (options?.width) params.width = options.width;
|
|
273
|
-
if (options?.height) params.height = options.height;
|
|
274
|
-
if (options?.length) params.length = options.length;
|
|
275
|
-
if (options?.type) params.type = options.type;
|
|
276
|
-
if (options?.format) params.format = options.format;
|
|
277
|
-
if (options?.noise !== void 0) params.noise = options.noise;
|
|
278
|
-
if (options?.bgColor) params.bgColor = options.bgColor;
|
|
279
|
-
if (options?.fontColor) params.fontColor = options.fontColor;
|
|
280
|
-
if (options?.fontSize) params.fontSize = options.fontSize;
|
|
281
270
|
try {
|
|
282
|
-
|
|
283
|
-
"/api/core/
|
|
271
|
+
return await this.http.post(
|
|
272
|
+
"/api/core/captcha/get",
|
|
284
273
|
void 0,
|
|
285
274
|
{
|
|
286
275
|
params,
|
|
287
276
|
headers: {
|
|
288
277
|
"Content-Type": "application/json",
|
|
289
278
|
Accept: "application/json",
|
|
290
|
-
"Client-Id": this.clientId
|
|
291
|
-
"Access-Token": this.accessToken
|
|
279
|
+
"Client-Id": this.clientId
|
|
292
280
|
}
|
|
293
281
|
}
|
|
294
282
|
);
|
|
295
|
-
return {
|
|
296
|
-
hasError: false,
|
|
297
|
-
result
|
|
298
|
-
};
|
|
299
283
|
} catch (err) {
|
|
300
284
|
return {
|
|
285
|
+
referenceNumber: 0,
|
|
301
286
|
hasError: true,
|
|
302
|
-
|
|
303
|
-
|
|
287
|
+
errorCode: err.status || 500,
|
|
288
|
+
refId: "",
|
|
289
|
+
message: [err.data?.message || err.message],
|
|
290
|
+
count: 0,
|
|
291
|
+
aggregations: 0,
|
|
292
|
+
result: {
|
|
293
|
+
hash: "",
|
|
294
|
+
expireTime: 0,
|
|
295
|
+
challenge: "",
|
|
296
|
+
url: ""
|
|
297
|
+
},
|
|
298
|
+
metaData: []
|
|
304
299
|
};
|
|
305
300
|
}
|
|
306
301
|
}
|
|
307
302
|
/**
|
|
308
303
|
* Check if the entered captcha value is valid
|
|
309
304
|
*/
|
|
310
|
-
async check(
|
|
305
|
+
async check(options) {
|
|
311
306
|
try {
|
|
312
|
-
|
|
313
|
-
`/api/core/
|
|
307
|
+
return await this.http.post(
|
|
308
|
+
`/api/core/captcha/check`,
|
|
314
309
|
{
|
|
315
|
-
|
|
310
|
+
value: options.value,
|
|
311
|
+
hash: options.hash
|
|
316
312
|
},
|
|
317
313
|
{
|
|
318
314
|
headers: {
|
|
319
315
|
"Content-Type": "application/json",
|
|
320
316
|
Accept: "application/json",
|
|
321
|
-
"Client-Id": this.clientId
|
|
322
|
-
"Access-Token": this.accessToken
|
|
317
|
+
"Client-Id": this.clientId
|
|
323
318
|
}
|
|
324
319
|
}
|
|
325
320
|
);
|
|
326
|
-
return {
|
|
327
|
-
hasError: false,
|
|
328
|
-
result
|
|
329
|
-
};
|
|
330
321
|
} catch (err) {
|
|
331
322
|
return {
|
|
332
323
|
hasError: true,
|
|
333
|
-
|
|
334
|
-
|
|
324
|
+
errorCode: err.status || 500,
|
|
325
|
+
message: [err.data?.message || err.message],
|
|
326
|
+
result: false,
|
|
327
|
+
metaData: []
|
|
335
328
|
};
|
|
336
329
|
}
|
|
337
330
|
}
|
|
@@ -2685,8 +2678,37 @@ var CmsProductService = class {
|
|
|
2685
2678
|
this.formatter = options.formatter || new CmsDataFormatter(options.podspaceUrl || "https://podspace.pod.ir");
|
|
2686
2679
|
this.http = options.http || createNextHttp({
|
|
2687
2680
|
baseUrl: options.baseUrl || "https://api.pod.ir/srv/cms-server",
|
|
2688
|
-
serviceName: "POD-CMS-PRODUCT"
|
|
2689
|
-
|
|
2681
|
+
serviceName: "POD-CMS-PRODUCT",
|
|
2682
|
+
queryArrayFormat: "brackets"
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
normalizeParams(params) {
|
|
2686
|
+
const arrayFields = [
|
|
2687
|
+
"fieldCode",
|
|
2688
|
+
"fieldValue",
|
|
2689
|
+
"excludeFieldCode",
|
|
2690
|
+
"excludeFieldValue",
|
|
2691
|
+
"tags",
|
|
2692
|
+
"excludeTags",
|
|
2693
|
+
"tagTrees",
|
|
2694
|
+
"tagTreesCode",
|
|
2695
|
+
"entityIds",
|
|
2696
|
+
"postIds",
|
|
2697
|
+
"notPostIds",
|
|
2698
|
+
"productTypeUniqueIds",
|
|
2699
|
+
"relatedContentId",
|
|
2700
|
+
"relatedProductId",
|
|
2701
|
+
"operationValuesArray",
|
|
2702
|
+
"orderBy",
|
|
2703
|
+
"sortBy"
|
|
2704
|
+
];
|
|
2705
|
+
const result = { ...params };
|
|
2706
|
+
for (const field of arrayFields) {
|
|
2707
|
+
if (result[field] !== void 0 && result[field] !== null && !Array.isArray(result[field])) {
|
|
2708
|
+
result[field] = [result[field]];
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
return result;
|
|
2690
2712
|
}
|
|
2691
2713
|
get commonHeaders() {
|
|
2692
2714
|
return {
|
|
@@ -2705,15 +2727,16 @@ var CmsProductService = class {
|
|
|
2705
2727
|
* Swagger: GET /api/core/products/enable
|
|
2706
2728
|
*/
|
|
2707
2729
|
async getProducts(params = {}, options = {}) {
|
|
2708
|
-
const transferParams = {
|
|
2730
|
+
const transferParams = this.normalizeParams({
|
|
2709
2731
|
size: 50,
|
|
2710
2732
|
offset: 0,
|
|
2711
2733
|
showDetail: true,
|
|
2712
2734
|
...params
|
|
2713
|
-
};
|
|
2735
|
+
});
|
|
2714
2736
|
try {
|
|
2715
2737
|
const res = await this.http.get("/api/core/products/enable", {
|
|
2716
2738
|
params: transferParams,
|
|
2739
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
2717
2740
|
headers: {
|
|
2718
2741
|
...this.commonHeaders,
|
|
2719
2742
|
...options.headers
|
|
@@ -2734,15 +2757,16 @@ var CmsProductService = class {
|
|
|
2734
2757
|
* Swagger: GET /api/core/products
|
|
2735
2758
|
*/
|
|
2736
2759
|
async getAllProducts(params = {}, options = {}) {
|
|
2737
|
-
const transferParams = {
|
|
2760
|
+
const transferParams = this.normalizeParams({
|
|
2738
2761
|
size: 50,
|
|
2739
2762
|
offset: 0,
|
|
2740
2763
|
showDetail: true,
|
|
2741
2764
|
...params
|
|
2742
|
-
};
|
|
2765
|
+
});
|
|
2743
2766
|
try {
|
|
2744
2767
|
const res = await this.http.get("/api/core/products", {
|
|
2745
2768
|
params: transferParams,
|
|
2769
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
2746
2770
|
headers: {
|
|
2747
2771
|
...this.managingHeaders,
|
|
2748
2772
|
...options.headers
|
|
@@ -2763,15 +2787,16 @@ var CmsProductService = class {
|
|
|
2763
2787
|
* Swagger: GET /api/core/products/manage
|
|
2764
2788
|
*/
|
|
2765
2789
|
async getManageProducts(params = {}, options = {}) {
|
|
2766
|
-
const transferParams = {
|
|
2790
|
+
const transferParams = this.normalizeParams({
|
|
2767
2791
|
size: 50,
|
|
2768
2792
|
offset: 0,
|
|
2769
2793
|
showDetail: true,
|
|
2770
2794
|
...params
|
|
2771
|
-
};
|
|
2795
|
+
});
|
|
2772
2796
|
try {
|
|
2773
2797
|
const res = await this.http.get("/api/core/products/manage", {
|
|
2774
2798
|
params: transferParams,
|
|
2799
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
2775
2800
|
headers: {
|
|
2776
2801
|
...this.managingHeaders,
|
|
2777
2802
|
...options.headers
|
|
@@ -2792,17 +2817,18 @@ var CmsProductService = class {
|
|
|
2792
2817
|
* Swagger: GET /api/core/products/{productTypeUniqueId}
|
|
2793
2818
|
*/
|
|
2794
2819
|
async getProductsByType(productTypeUniqueId, params = {}, options = {}) {
|
|
2795
|
-
const transferParams = {
|
|
2820
|
+
const transferParams = this.normalizeParams({
|
|
2796
2821
|
size: 50,
|
|
2797
2822
|
offset: 0,
|
|
2798
2823
|
showDetail: true,
|
|
2799
2824
|
...params
|
|
2800
|
-
};
|
|
2825
|
+
});
|
|
2801
2826
|
try {
|
|
2802
2827
|
const res = await this.http.get(
|
|
2803
2828
|
`/api/core/products/${productTypeUniqueId}`,
|
|
2804
2829
|
{
|
|
2805
2830
|
params: transferParams,
|
|
2831
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
2806
2832
|
headers: {
|
|
2807
2833
|
...this.managingHeaders,
|
|
2808
2834
|
...options.headers
|
|
@@ -2902,7 +2928,8 @@ var CmsProductService = class {
|
|
|
2902
2928
|
const res = await this.http.get(
|
|
2903
2929
|
"/api/core/products/enable/search",
|
|
2904
2930
|
{
|
|
2905
|
-
params,
|
|
2931
|
+
params: this.normalizeParams(params),
|
|
2932
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
2906
2933
|
headers: {
|
|
2907
2934
|
...this.commonHeaders,
|
|
2908
2935
|
...options.headers
|
|
@@ -3108,7 +3135,8 @@ var CmsTagService = class {
|
|
|
3108
3135
|
this.revalidate = Number(options.revalidate) || 0;
|
|
3109
3136
|
this.http = options.http || createNextHttp({
|
|
3110
3137
|
baseUrl: options.baseUrl || "https://api.pod.ir/srv/cms-server",
|
|
3111
|
-
serviceName: "POD-CMS-TAGS"
|
|
3138
|
+
serviceName: "POD-CMS-TAGS",
|
|
3139
|
+
queryArrayFormat: "brackets"
|
|
3112
3140
|
});
|
|
3113
3141
|
}
|
|
3114
3142
|
get commonHeaders() {
|
|
@@ -3514,7 +3542,8 @@ var CmsService = class {
|
|
|
3514
3542
|
this.formatter = new CmsDataFormatter(options.podspaceUrl || "https://podspace.pod.ir");
|
|
3515
3543
|
this.http = createNextHttp({
|
|
3516
3544
|
baseUrl: options.baseUrl,
|
|
3517
|
-
serviceName: "POD-CMS"
|
|
3545
|
+
serviceName: "POD-CMS",
|
|
3546
|
+
queryArrayFormat: "brackets"
|
|
3518
3547
|
});
|
|
3519
3548
|
this.products = new CmsProductService({
|
|
3520
3549
|
http: this.http,
|
|
@@ -3530,6 +3559,29 @@ var CmsService = class {
|
|
|
3530
3559
|
revalidate: this.revalidate
|
|
3531
3560
|
});
|
|
3532
3561
|
}
|
|
3562
|
+
normalizeParams(params) {
|
|
3563
|
+
const arrayFields = [
|
|
3564
|
+
"fieldCode",
|
|
3565
|
+
"fieldValue",
|
|
3566
|
+
"excludeFieldCode",
|
|
3567
|
+
"excludeFieldValue",
|
|
3568
|
+
"tags",
|
|
3569
|
+
"tagTrees",
|
|
3570
|
+
"tagTreesCode",
|
|
3571
|
+
"entityIds",
|
|
3572
|
+
"postIds",
|
|
3573
|
+
"notPostIds",
|
|
3574
|
+
"operationValuesArray",
|
|
3575
|
+
"orderBy"
|
|
3576
|
+
];
|
|
3577
|
+
const result = { ...params };
|
|
3578
|
+
for (const field of arrayFields) {
|
|
3579
|
+
if (result[field] !== void 0 && result[field] !== null && !Array.isArray(result[field])) {
|
|
3580
|
+
result[field] = [result[field]];
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
return result;
|
|
3584
|
+
}
|
|
3533
3585
|
get commonHeaders() {
|
|
3534
3586
|
return {
|
|
3535
3587
|
"Client-Id": this.clientId,
|
|
@@ -3550,15 +3602,16 @@ var CmsService = class {
|
|
|
3550
3602
|
* Swagger: GET /api/core/contents/enable
|
|
3551
3603
|
*/
|
|
3552
3604
|
async getContent(params = {}, options = {}) {
|
|
3553
|
-
const transferParams = {
|
|
3605
|
+
const transferParams = this.normalizeParams({
|
|
3554
3606
|
size: 50,
|
|
3555
3607
|
offset: 0,
|
|
3556
3608
|
showDetail: true,
|
|
3557
3609
|
...params
|
|
3558
|
-
};
|
|
3610
|
+
});
|
|
3559
3611
|
try {
|
|
3560
3612
|
const res = await this.http.get("/api/core/contents/enable", {
|
|
3561
3613
|
params: transferParams,
|
|
3614
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
3562
3615
|
headers: {
|
|
3563
3616
|
...this.commonHeaders,
|
|
3564
3617
|
...options.headers
|
|
@@ -3579,15 +3632,16 @@ var CmsService = class {
|
|
|
3579
3632
|
* Swagger: GET /api/core/contents
|
|
3580
3633
|
*/
|
|
3581
3634
|
async getAllContents(params = {}, options = {}) {
|
|
3582
|
-
const transferParams = {
|
|
3635
|
+
const transferParams = this.normalizeParams({
|
|
3583
3636
|
size: 50,
|
|
3584
3637
|
offset: 0,
|
|
3585
3638
|
showDetail: true,
|
|
3586
3639
|
...params
|
|
3587
|
-
};
|
|
3640
|
+
});
|
|
3588
3641
|
try {
|
|
3589
3642
|
const res = await this.http.get("/api/core/contents", {
|
|
3590
3643
|
params: transferParams,
|
|
3644
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
3591
3645
|
headers: {
|
|
3592
3646
|
...this.managingHeaders,
|
|
3593
3647
|
...options.headers
|
|
@@ -3608,15 +3662,16 @@ var CmsService = class {
|
|
|
3608
3662
|
* Swagger: GET /api/core/contents/my
|
|
3609
3663
|
*/
|
|
3610
3664
|
async getMyContents(params = {}, options = {}) {
|
|
3611
|
-
const transferParams = {
|
|
3665
|
+
const transferParams = this.normalizeParams({
|
|
3612
3666
|
size: 50,
|
|
3613
3667
|
offset: 0,
|
|
3614
3668
|
showDetail: true,
|
|
3615
3669
|
...params
|
|
3616
|
-
};
|
|
3670
|
+
});
|
|
3617
3671
|
try {
|
|
3618
3672
|
const res = await this.http.get("/api/core/contents/my", {
|
|
3619
3673
|
params: transferParams,
|
|
3674
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
3620
3675
|
headers: {
|
|
3621
3676
|
...this.managingHeaders,
|
|
3622
3677
|
...options.headers
|
|
@@ -3637,17 +3692,18 @@ var CmsService = class {
|
|
|
3637
3692
|
* Swagger: GET /api/core/contents/{contentTypeUniqueId}
|
|
3638
3693
|
*/
|
|
3639
3694
|
async getContentsByType(contentTypeUniqueId, params = {}, options = {}) {
|
|
3640
|
-
const transferParams = {
|
|
3695
|
+
const transferParams = this.normalizeParams({
|
|
3641
3696
|
size: 50,
|
|
3642
3697
|
offset: 0,
|
|
3643
3698
|
showDetail: true,
|
|
3644
3699
|
...params
|
|
3645
|
-
};
|
|
3700
|
+
});
|
|
3646
3701
|
try {
|
|
3647
3702
|
const res = await this.http.get(
|
|
3648
3703
|
`/api/core/contents/${contentTypeUniqueId}`,
|
|
3649
3704
|
{
|
|
3650
3705
|
params: transferParams,
|
|
3706
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
3651
3707
|
headers: {
|
|
3652
3708
|
...this.managingHeaders,
|
|
3653
3709
|
...options.headers
|
|
@@ -3725,7 +3781,8 @@ var CmsService = class {
|
|
|
3725
3781
|
async searchContent(params = {}, options = {}) {
|
|
3726
3782
|
try {
|
|
3727
3783
|
const res = await this.http.get("/api/core/contents/search", {
|
|
3728
|
-
params,
|
|
3784
|
+
params: this.normalizeParams(params),
|
|
3785
|
+
queryArrayFormat: options.queryArrayFormat,
|
|
3729
3786
|
headers: {
|
|
3730
3787
|
...this.commonHeaders,
|
|
3731
3788
|
...options.headers
|
|
@@ -4249,8 +4306,12 @@ var PodSdk = class {
|
|
|
4249
4306
|
websiteUrl: urls.website,
|
|
4250
4307
|
revalidate
|
|
4251
4308
|
});
|
|
4309
|
+
const cmsUrl = (urls.cms || "https://api.pod.ir/srv/cms-server").replace(
|
|
4310
|
+
/^http:\/\//i,
|
|
4311
|
+
"https://"
|
|
4312
|
+
);
|
|
4252
4313
|
this.captcha = new CaptchaService({
|
|
4253
|
-
baseUrl:
|
|
4314
|
+
baseUrl: cmsUrl,
|
|
4254
4315
|
clientId,
|
|
4255
4316
|
accessToken: apiToken
|
|
4256
4317
|
});
|
|
@@ -4305,6 +4366,491 @@ function createPodSdk(config) {
|
|
|
4305
4366
|
}
|
|
4306
4367
|
var client_default = PodSdk;
|
|
4307
4368
|
|
|
4308
|
-
|
|
4369
|
+
// src/openapi.ts
|
|
4370
|
+
var e = (tag, method, path, operationId, summary, extras = {}) => ({ tag, method, path, operationId, summary, ...extras });
|
|
4371
|
+
var POD_OPENAPI_ENDPOINTS = [
|
|
4372
|
+
// SSO
|
|
4373
|
+
e("SSO", "post", "/oauth2/clients/handshake/{clientId}", "ssoHandshake", "Create an SSO handshake", {
|
|
4374
|
+
query: ["device_type!", "algorithm!", "device_uid!", "device_client_ip!"],
|
|
4375
|
+
security: "bearer"
|
|
4376
|
+
}),
|
|
4377
|
+
e("SSO", "post", "/oauth2/otp/authorize/{phoneNumber}", "ssoSendOtpCode", "Send an OTP code", {
|
|
4378
|
+
query: ["identityType", "response_type", "referrerType", "linkDeliveryType", "scope", "redirect_uri"],
|
|
4379
|
+
security: "signature"
|
|
4380
|
+
}),
|
|
4381
|
+
e("SSO", "post", "/oauth2/otp/verify/{phoneNumber}", "ssoVerifyOtpCode", "Verify an OTP code", {
|
|
4382
|
+
query: ["otp!", "redirect_uri!"],
|
|
4383
|
+
security: "signature"
|
|
4384
|
+
}),
|
|
4385
|
+
e("SSO", "post", "/oauth2/token", "ssoGenerateToken", "Exchange an authorization code or refresh token", {
|
|
4386
|
+
query: ["grant_type!", "code", "redirect_uri", "refresh_token"],
|
|
4387
|
+
security: "basic",
|
|
4388
|
+
sdkMethods: ["generateToken", "refreshToken"]
|
|
4389
|
+
}),
|
|
4390
|
+
e("SSO", "get", "/users", "ssoGetUserProfile", "Get the authenticated SSO user profile", { security: "bearer" }),
|
|
4391
|
+
// Captcha
|
|
4392
|
+
e("Captcha", "post", "/api/core/captcha/get", "captchaGet", "Generate a captcha challenge", { security: "clientId" }),
|
|
4393
|
+
e("Captcha", "post", "/api/core/captcha/check", "captchaCheck", "Validate a captcha challenge", { security: "clientId", body: "json", bodyRequired: true }),
|
|
4394
|
+
// Custom Post
|
|
4395
|
+
e("Custom Post", "get", "/srv/core/nzh/biz/searchTimelineByMetadata", "customPostSearchTimelineByMetadata", "Search timeline entries by metadata", {
|
|
4396
|
+
query: ["metadata", "metaQuery", "offset", "size"],
|
|
4397
|
+
security: "apiToken"
|
|
4398
|
+
}),
|
|
4399
|
+
e("Custom Post", "get", "/srv/core/nzh/biz/customPostList", "customPostGet", "List custom posts or get one post", {
|
|
4400
|
+
query: ["entityId", "id", "uniqueId", "offset", "size"],
|
|
4401
|
+
security: "apiToken",
|
|
4402
|
+
sdkMethods: ["getCustomPost", "createCrud.getAll", "createCrud.getById"]
|
|
4403
|
+
}),
|
|
4404
|
+
e("Custom Post", "post", "/srv/core/nzh/biz/addCustomPost", "customPostCreate", "Create a custom post", {
|
|
4405
|
+
body: "form",
|
|
4406
|
+
bodyRequired: true,
|
|
4407
|
+
security: "apiToken",
|
|
4408
|
+
sdkMethods: ["addCustomPost", "addCustomPostList", "createCrud.create", "createCrud.createMultiple", "createCrud.createAndBindEntityId"]
|
|
4409
|
+
}),
|
|
4410
|
+
e("Custom Post", "post", "/srv/core/nzh/biz/updateCustomPost", "customPostUpdate", "Update a custom post", {
|
|
4411
|
+
body: "form",
|
|
4412
|
+
bodyRequired: true,
|
|
4413
|
+
security: "apiToken",
|
|
4414
|
+
sdkMethods: ["updateCustomPost", "createCrud.update", "createCrud.archive"]
|
|
4415
|
+
}),
|
|
4416
|
+
e("Custom Post", "post", "/srv/core/nzh/biz/deleteCustomPost", "customPostDelete", "Delete a custom post", {
|
|
4417
|
+
query: ["entityId!"],
|
|
4418
|
+
security: "apiToken",
|
|
4419
|
+
sdkMethods: ["deleteCustomPost", "createCrud.delete"]
|
|
4420
|
+
}),
|
|
4421
|
+
// Notification and Social
|
|
4422
|
+
e("Notification", "post", "/service/sms", "notificationSendSms", "Send an SMS notification", { body: "json", bodyRequired: true, security: "apiToken" }),
|
|
4423
|
+
e("Social", "get", "/srv/core/nzh/commentList", "socialGetCommentList", "List comments for a subject", { query: ["postId", "subjectId", "offset", "size"], security: "apiToken" }),
|
|
4424
|
+
e("Social", "get", "/srv/core/nzh/comment", "socialAddComment", "Add a comment to a subject", { query: ["postId", "subjectId", "content!"], security: "apiToken" }),
|
|
4425
|
+
e("Social", "get", "/srv/core/nzh/likeComment", "socialLikeComment", "Like or dislike a comment", { query: ["commentId!", "dislike"], security: "apiToken" }),
|
|
4426
|
+
e("Social", "get", "/srv/core/nzh/like", "socialLikePost", "Like or dislike a post", { query: ["postId!", "dislike"], security: "apiToken" }),
|
|
4427
|
+
// IUMS exposes several SDK methods through one RPC-style HTTP endpoint.
|
|
4428
|
+
e("IUMS", "get", "/", "iumsInvokeService", "Invoke an IUMS ExternalFacade method", {
|
|
4429
|
+
query: ["data!"],
|
|
4430
|
+
security: "clientId",
|
|
4431
|
+
sdkMethods: ["getInfOfGraduatedByGraduateDate", "getSessionClassInCurrentDay", "getDetailsOfTermExam", "getStudentInformationByNumber", "getStudentInformationByNationalCode"]
|
|
4432
|
+
}),
|
|
4433
|
+
// PodForm
|
|
4434
|
+
e("PodForm", "get", "/forms/{formId}", "podFormGetForm", "Get a form", { query: ["lockForEdit"], security: "podFormToken", sdkMethods: ["getForm", "getPodformById"] }),
|
|
4435
|
+
e("PodForm", "get", "/forms/all", "podFormGetForms", "List forms", { query: ["page", "size", "folderId", "status", "search"], security: "podFormToken" }),
|
|
4436
|
+
e("PodForm", "post", "/forms", "podFormCreateForm", "Create a form", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4437
|
+
e("PodForm", "patch", "/forms/{formId}", "podFormUpdateForm", "Update a form", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4438
|
+
e("PodForm", "delete", "/forms/{formId}", "podFormDeleteForm", "Delete a form", { query: ["removeFromTrash"], security: "podFormToken" }),
|
|
4439
|
+
e("PodForm", "get", "/forms/{formId}/settings", "podFormGetSettings", "Get form settings", { query: ["password"], security: "podFormToken" }),
|
|
4440
|
+
e("PodForm", "patch", "/forms/{formId}/settings", "podFormUpdateSettings", "Update form settings", { query: ["password"], body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4441
|
+
e("PodForm", "post", "/forms/{formId}/fields", "podFormAddField", "Add a field to a form", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4442
|
+
e("PodForm", "post", "/forms/{formId}/fields/batch", "podFormAddFields", "Add multiple fields to a form", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4443
|
+
e("PodForm", "patch", "/forms/{formId}/fields", "podFormUpdateFields", "Update form fields", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4444
|
+
e("PodForm", "delete", "/forms/{formId}/fields", "podFormDeleteFields", "Delete form fields", { query: ["fieldIds!"], security: "podFormToken" }),
|
|
4445
|
+
e("PodForm", "get", "/forms/{formId}/preview", "podFormGetPreview", "Preview a form", { query: ["password", "language"], security: "podFormToken" }),
|
|
4446
|
+
e("PodForm", "get", "/forms/{formHash}/previewByHash", "podFormGetPreviewByHash", "Preview a public form by hash", { query: ["password", "language"], security: "none" }),
|
|
4447
|
+
e("PodForm", "get", "/forms/{formHash}/generateCaptcha", "podFormGenerateCaptcha", "Generate a public form captcha", { security: "none" }),
|
|
4448
|
+
e("PodForm", "post", "/responses/{formHash}", "podFormSaveResponse", "Submit a form response", { query: ["password", "captchaValue", "captchaHash"], body: "json", bodyRequired: true, security: "none", sdkMethods: ["saveResponse", "sendForm"] }),
|
|
4449
|
+
e("PodForm", "post", "/responses/{formId}/initiate", "podFormInitiateResponse", "Initiate a form response", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4450
|
+
e("PodForm", "get", "/responses/all/{formId}", "podFormGetResponses", "List form responses", { query: ["page", "size", "from", "to", "status"], security: "podFormToken" }),
|
|
4451
|
+
e("PodForm", "get", "/responses/all/byFormHash/{formHash}", "podFormGetResponsesByHash", "List responses by form hash", { query: ["page", "size", "from", "to", "status"], security: "podFormToken" }),
|
|
4452
|
+
e("PodForm", "get", "/responses/{responseId}", "podFormGetResponse", "Get a form response", { query: ["formId"], security: "podFormToken" }),
|
|
4453
|
+
e("PodForm", "patch", "/responses/{responseId}", "podFormUpdateResponse", "Update response fields", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4454
|
+
e("PodForm", "delete", "/responses/{formId}", "podFormDeleteResponsesByQuery", "Delete responses by IDs in the query string", { query: ["responseIds!"], security: "podFormToken" }),
|
|
4455
|
+
e("PodForm", "put", "/responses/{formId}", "podFormDeleteResponses", "Delete responses", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4456
|
+
e("PodForm", "get", "/templates", "podFormGetTemplates", "List form templates", { query: ["page", "size", "templateOwnership"], security: "podFormToken" }),
|
|
4457
|
+
e("PodForm", "post", "/templates", "podFormCreateTemplate", "Create a form template", { query: ["templateOwnership"], body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4458
|
+
e("PodForm", "patch", "/templates/{templateId}", "podFormUpdateTemplate", "Update a form template", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4459
|
+
e("PodForm", "delete", "/templates/{templateId}", "podFormDeleteTemplate", "Delete a form template", { security: "podFormToken" }),
|
|
4460
|
+
e("PodForm", "get", "/folders", "podFormGetFolders", "List form folders", { query: ["page", "size", "trash"], security: "podFormToken" }),
|
|
4461
|
+
e("PodForm", "post", "/folders", "podFormCreateFolder", "Create a form folder", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4462
|
+
e("PodForm", "patch", "/folders/{folderId}", "podFormUpdateFolder", "Update a form folder", { body: "json", bodyRequired: true, security: "podFormToken" }),
|
|
4463
|
+
e("PodForm", "delete", "/folders/{folderId}", "podFormDeleteFolder", "Delete a form folder", { query: ["removeFromTrash"], security: "podFormToken" }),
|
|
4464
|
+
e("PodForm", "get", "/otp/{formHash}/send", "podFormSendOtp", "Send form OTP", { query: ["phoneNumber!", "email"], security: "none" }),
|
|
4465
|
+
e("PodForm", "get", "/otp/{formHash}/validate", "podFormValidateOtp", "Validate form OTP", { query: ["phoneNumber!", "email", "code!"], security: "none" }),
|
|
4466
|
+
e("PodForm", "get", "/user", "podFormGetUser", "Get the PodForm user", { security: "podFormToken" }),
|
|
4467
|
+
e("PodForm", "get", "/user/getUploadLink", "podFormGetUploadLink", "Get a PodForm upload link", { security: "podFormToken" }),
|
|
4468
|
+
e("PodForm", "get", "/user/getDownloadLink", "podFormGetDownloadLink", "Get a PodForm download link", { query: ["hash!", "fileName"], security: "podFormToken" }),
|
|
4469
|
+
e("PodForm", "get", "/plans/all", "podFormGetPlans", "List PodForm plans", { query: ["page", "size"], security: "podFormToken" }),
|
|
4470
|
+
e("PodForm", "get", "/plans", "podFormGetUserPlan", "Get the current PodForm plan", { security: "podFormToken" }),
|
|
4471
|
+
e("PodForm", "get", "/responses/{formId}/export", "podFormExportResponses", "Export form responses", { query: ["type", "from", "to"], security: "podFormToken", response: "binary" }),
|
|
4472
|
+
e("PodForm", "get", "/forms/{formId}/reports", "podFormGetReport", "Get a form report", { security: "podFormToken" }),
|
|
4473
|
+
// CMS content
|
|
4474
|
+
e("CMS Content", "get", "/api/core/contents/enable", "cmsGetContent", "List enabled content", { query: ["offset", "size", "showDetail", "contentTypeUniqueId", "tags"], security: "cmsPublic" }),
|
|
4475
|
+
e("CMS Content", "get", "/api/core/contents", "cmsGetAllContents", "List all content", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4476
|
+
e("CMS Content", "get", "/api/core/contents/my", "cmsGetMyContents", "List content owned by the current client", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4477
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}", "cmsGetContentsByType", "List content by type", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4478
|
+
e("CMS Content", "get", "/api/core/contents/enable/{entityId}", "cmsGetContentByEntityId", "Get enabled content by entity ID", { security: "cmsPublic" }),
|
|
4479
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}/enable/{entityId}", "cmsGetTypedContentByEntityId", "Get enabled typed content by entity ID", { security: "cmsPublic", sdkMethods: ["getContentByEntityId"] }),
|
|
4480
|
+
e("CMS Content", "get", "/api/core/contents/{contentUniqueId}/byContentUniqueId/enable", "cmsGetContentByUniqueId", "Get enabled content by unique ID", { security: "cmsPublic" }),
|
|
4481
|
+
e("CMS Content", "get", "/api/core/contents/search", "cmsSearchContent", "Search enabled content", { query: ["query", "name", "offset", "size"], security: "cmsPublic" }),
|
|
4482
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/add-publish", "cmsAddContent", "Create and publish content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4483
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}", "cmsCreateContent", "Create unpublished content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4484
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/{entityId}/edit-publish", "cmsEditContent", "Update and publish content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4485
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/{entityId}", "cmsUpdateContent", "Replace content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4486
|
+
e("CMS Content", "patch", "/api/core/contents/{contentTypeUniqueId}/{entityId}", "cmsPatchContent", "Partially update content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4487
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/publish/{entityId}", "cmsPublishContent", "Publish content", { security: "cmsManage" }),
|
|
4488
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/unpublish/{entityId}", "cmsUnpublishContent", "Unpublish content", { security: "cmsManage" }),
|
|
4489
|
+
e("CMS Content", "put", "/api/core/contents/publish", "cmsBatchPublishAllTypes", "Batch publish content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4490
|
+
e("CMS Content", "put", "/api/core/contents/{contentTypeUniqueId}/publish", "cmsBatchPublish", "Batch publish typed content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4491
|
+
e("CMS Content", "put", "/api/core/contents/unpublish", "cmsBatchUnpublishAllTypes", "Batch unpublish content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4492
|
+
e("CMS Content", "put", "/api/core/contents/{contentTypeUniqueId}/unpublish", "cmsBatchUnpublish", "Batch unpublish typed content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4493
|
+
e("CMS Content", "post", "/api/core/contents/archive", "cmsArchiveAllTypes", "Archive content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4494
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/archive", "cmsArchiveContent", "Archive typed content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4495
|
+
e("CMS Content", "post", "/api/core/contents/unarchive", "cmsUnarchiveAllTypes", "Unarchive content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4496
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/unarchive", "cmsUnarchiveContent", "Unarchive typed content", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4497
|
+
e("CMS Content", "get", "/api/core/contents/archive", "cmsGetArchivedContents", "List archived content", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4498
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}/archive", "cmsGetArchivedContentsByType", "List archived content by type", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4499
|
+
e("CMS Content", "get", "/api/core/contents/draft", "cmsGetDrafts", "List drafts", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4500
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}/draft", "cmsGetDraftsByType", "List drafts by content type", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4501
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/draft", "cmsCreateDraft", "Create a draft", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4502
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}/draft/{entityId}", "cmsGetDraftById", "Get a draft", { security: "cmsManage" }),
|
|
4503
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/draft/{entityId}", "cmsUpdateDraft", "Update a draft", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4504
|
+
e("CMS Content", "post", "/api/core/contents/{contentTypeUniqueId}/undraft/{entityId}", "cmsUndraftContent", "Convert a draft to regular content", { security: "cmsManage" }),
|
|
4505
|
+
e("CMS Content", "get", "/api/core/contents/{contentTypeUniqueId}/comments/{entityId}", "cmsGetComments", "List content comments", { query: ["offset", "size"], security: "cmsPublic" }),
|
|
4506
|
+
e("CMS Content", "get", "/api/core/contents/{contentUniqueId}/like/{entityId}", "cmsGetLikes", "List content likes", { query: ["offset", "size"], security: "cmsPublic" }),
|
|
4507
|
+
e("CMS Content", "get", "/api/core/contents/{contentUniqueId}/dislike/{entityId}", "cmsGetDislikes", "List content dislikes", { query: ["offset", "size"], security: "cmsPublic" }),
|
|
4508
|
+
e("CMS Content", "get", "/api/core/content-types/{contentTypeUniqueId}", "cmsGetContentTypeDetail", "Get content type details", { security: "cmsManage" }),
|
|
4509
|
+
e("CMS Content", "get", "/api/core/contents/ai/timeline-search/enable", "cmsTimelineSearch", "Run advanced content timeline search", { query: ["advance", "newVersion", "offset", "size"], security: "cmsPublic" }),
|
|
4510
|
+
// CMS products
|
|
4511
|
+
e("CMS Products", "get", "/api/core/products/enable", "cmsGetProducts", "List enabled products", { query: ["offset", "size", "showDetail", "productTypeUniqueId", "tags"], security: "cmsPublic" }),
|
|
4512
|
+
e("CMS Products", "get", "/api/core/products", "cmsGetAllProducts", "List all products", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4513
|
+
e("CMS Products", "get", "/api/core/products/manage", "cmsGetManageProducts", "List products for management", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4514
|
+
e("CMS Products", "get", "/api/core/products/{productTypeUniqueId}", "cmsGetProductsByType", "List products by type", { query: ["offset", "size", "showDetail", "enable"], security: "cmsManage" }),
|
|
4515
|
+
e("CMS Products", "get", "/api/core/products/enable/{entityId}", "cmsGetProductByEntityId", "Get enabled product by entity ID", { security: "cmsPublic" }),
|
|
4516
|
+
e("CMS Products", "get", "/api/core/products/{productTypeUniqueId}/enable/{entityId}", "cmsGetTypedProductByEntityId", "Get enabled typed product by entity ID", { security: "cmsPublic", sdkMethods: ["getProductByEntityId"] }),
|
|
4517
|
+
e("CMS Products", "get", "/api/core/products/{productUniqueId}/byProductUniqueId/enable", "cmsGetProductByUniqueId", "Get product by unique ID", { security: "cmsPublic" }),
|
|
4518
|
+
e("CMS Products", "get", "/api/core/products/barcode/enable", "cmsGetProductByBarcode", "Get product by barcode", { query: ["barcode!"], security: "cmsPublic" }),
|
|
4519
|
+
e("CMS Products", "get", "/api/core/products/enable/search", "cmsSearchProducts", "Search enabled products", { query: ["query", "name", "offset", "size"], security: "cmsPublic" }),
|
|
4520
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/add-publish", "cmsAddProduct", "Create and publish a product", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4521
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}", "cmsCreateProduct", "Create an unpublished product", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4522
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/{entityId}/edit-publish", "cmsEditProduct", "Update and publish a product", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4523
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/{entityId}", "cmsUpdateProduct", "Replace a product", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4524
|
+
e("CMS Products", "patch", "/api/core/products/{productTypeUniqueId}/{entityId}", "cmsPatchProduct", "Partially update a product", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4525
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/publish/{entityId}", "cmsPublishProduct", "Publish a product", { security: "cmsManage" }),
|
|
4526
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/unpublish/{entityId}", "cmsUnpublishProduct", "Unpublish a product", { security: "cmsManage" }),
|
|
4527
|
+
e("CMS Products", "put", "/api/core/products/publish", "cmsBatchPublishAllProductTypes", "Batch publish products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4528
|
+
e("CMS Products", "put", "/api/core/products/{productTypeUniqueId}/publish", "cmsBatchPublishProducts", "Batch publish typed products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4529
|
+
e("CMS Products", "put", "/api/core/products/unpublish", "cmsBatchUnpublishAllProductTypes", "Batch unpublish products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4530
|
+
e("CMS Products", "put", "/api/core/products/{productTypeUniqueId}/unpublish", "cmsBatchUnpublishProducts", "Batch unpublish typed products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4531
|
+
e("CMS Products", "post", "/api/core/products/archive", "cmsArchiveAllProductTypes", "Archive products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4532
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/archive", "cmsArchiveProducts", "Archive typed products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4533
|
+
e("CMS Products", "post", "/api/core/products/unarchive", "cmsUnarchiveAllProductTypes", "Unarchive products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4534
|
+
e("CMS Products", "post", "/api/core/products/{productTypeUniqueId}/unarchive", "cmsUnarchiveProducts", "Unarchive typed products", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4535
|
+
e("CMS Products", "get", "/api/core/products/archive", "cmsGetArchivedProducts", "List archived products", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4536
|
+
e("CMS Products", "get", "/api/core/products/{productTypeUniqueId}/archive", "cmsGetArchivedProductsByType", "List archived products by type", { query: ["offset", "size"], security: "cmsManage" }),
|
|
4537
|
+
e("CMS Products", "get", "/api/core/products/ai/timeline-search/enable", "cmsProductTimelineSearch", "Run advanced product timeline search", { query: ["advance", "newVersion", "offset", "size"], security: "cmsPublic" }),
|
|
4538
|
+
// CMS tags
|
|
4539
|
+
e("CMS Tags", "get", "/api/core/tags/category", "cmsGetTagCategories", "List tag categories", { query: ["offset", "size", "enable"], security: "cmsPublic" }),
|
|
4540
|
+
e("CMS Tags", "post", "/api/core/tags/category", "cmsCreateTagCategory", "Create a tag category", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4541
|
+
e("CMS Tags", "get", "/api/core/tags/category/{id}", "cmsGetTagCategory", "Get a tag category", { security: "cmsManage" }),
|
|
4542
|
+
e("CMS Tags", "put", "/api/core/tags/category/{id}", "cmsUpdateTagCategory", "Update a tag category", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4543
|
+
e("CMS Tags", "put", "/api/core/tags/category/{id}/publish", "cmsPublishTagCategory", "Publish a tag category", { security: "cmsManage" }),
|
|
4544
|
+
e("CMS Tags", "put", "/api/core/tags/category/{id}/unpublish", "cmsUnpublishTagCategory", "Unpublish a tag category", { security: "cmsManage" }),
|
|
4545
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/enable", "cmsGetTagTree", "Get the enabled tag tree", { query: ["offset", "size", "parentId", "level"], security: "cmsPublic", sdkMethods: ["getTagTree", "getCategories"] }),
|
|
4546
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/manage", "cmsGetManageTagTree", "Get the tag tree for management", { query: ["offset", "size", "parentId", "level"], security: "cmsManage" }),
|
|
4547
|
+
e("CMS Tags", "post", "/api/core/tags/{categoryId}/tree", "cmsCreateTagTreeItem", "Create a tag tree item", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4548
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/{id}/enable", "cmsGetTagTreeItem", "Get an enabled tag tree item", { security: "cmsPublic" }),
|
|
4549
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/{id}/manage", "cmsGetManageTagTreeItem", "Get a tag tree item for management", { security: "cmsManage" }),
|
|
4550
|
+
e("CMS Tags", "put", "/api/core/tags/{categoryId}/tree/{id}", "cmsUpdateTagTreeItem", "Update a tag tree item", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4551
|
+
e("CMS Tags", "put", "/api/core/tags/{categoryId}/tree/publish/{id}", "cmsPublishTagTreeItem", "Publish a tag tree item", { security: "cmsManage" }),
|
|
4552
|
+
e("CMS Tags", "put", "/api/core/tags/{categoryId}/tree/unpublish/{id}", "cmsUnpublishTagTreeItem", "Unpublish a tag tree item", { security: "cmsManage" }),
|
|
4553
|
+
e("CMS Tags", "put", "/api/core/tags/{categoryId}/tree/parent/{id}", "cmsUpdateTagTreeParent", "Move a tag tree item", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4554
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/parent/{id}/enable", "cmsGetTagTreeAncestors", "Get enabled tag ancestors", { query: ["includeCurrent"], security: "cmsPublic" }),
|
|
4555
|
+
e("CMS Tags", "get", "/api/core/tags/{categoryId}/tree/parent/{id}/manage", "cmsGetManageTagTreeAncestors", "Get tag ancestors for management", { query: ["includeCurrent"], security: "cmsManage" }),
|
|
4556
|
+
e("CMS Tags", "put", "/api/core/tags/{categoryId}/tree/code/{id}", "cmsUpdateTagTreeCode", "Update a tag tree code", { body: "json", bodyRequired: true, security: "cmsManage" }),
|
|
4557
|
+
// Podspace upload, download and file operations
|
|
4558
|
+
e("Podspace Files", "post", "/api/files", "podspaceUploadFile", "Upload a file", { query: ["path", "isPublic", "fileName", "parentHash"], body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4559
|
+
e("Podspace Files", "post", "/api/files/multiple", "podspaceUploadMultipleFiles", "Upload multiple files", { query: ["path", "isPublic", "parentHash"], body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4560
|
+
e("Podspace Files", "post", "/api/images/base64", "podspaceUploadImageBase64", "Upload a base64 image", { query: ["base64!", "fileName", "path", "isPublic"], security: "bearer" }),
|
|
4561
|
+
e("Podspace Files", "put", "/api/files/{hash}", "podspaceReplaceFile", "Replace file contents", { query: ["fileName"], body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4562
|
+
e("Podspace Files", "post", "/api/files/{hash}", "podspaceUploadByLink", "Upload file contents using an upload hash", { body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4563
|
+
e("Podspace Files", "get", "/api/files/{hash}", "podspaceDownloadFile", "Download a file", { query: ["download", "password", "shareHash"], security: "bearer", response: "binary" }),
|
|
4564
|
+
e("Podspace Files", "get", "/api/v2/images/{hash}", "podspaceDownloadImage", "Download or transform an image", { query: ["width", "height", "crop", "quality", "format", "download"], security: "bearer", response: "binary" }),
|
|
4565
|
+
e("Podspace Files", "get", "/api/files/{hash}/thumbnail", "podspaceDownloadThumbnail", "Download a file thumbnail", { query: ["width", "height", "quality"], security: "bearer", response: "binary" }),
|
|
4566
|
+
e("Podspace Files", "get", "/api/files", "podspaceDownloadFilesAsZip", "Download entities as a ZIP archive", { query: ["hashes!", "fileName"], security: "bearer", response: "binary" }),
|
|
4567
|
+
e("Podspace Files", "get", "/api/files/link", "podspaceGetUploadLink", "Get a pre-signed upload link", { query: ["fileName!", "path", "size", "parentHash"], security: "bearer" }),
|
|
4568
|
+
e("Podspace Files", "get", "/api/files/{hash}/detail", "podspaceGetFileDetail", "Get file or folder details", { query: ["password", "breadcrumb", "shareHash", "nativeMetadata", "includeSizeAndCount"], security: "bearer" }),
|
|
4569
|
+
e("Podspace Files", "get", "/api/files/details", "podspaceGetFileDetailByPath", "Get file details by path", { query: ["path!", "parentHash", "password", "entityType"], security: "bearer" }),
|
|
4570
|
+
e("Podspace Files", "get", "/api/files/{hash}/exist", "podspaceCheckEntityExist", "Check whether an entity exists", { query: ["fileName!", "uniqueName", "type"], security: "bearer" }),
|
|
4571
|
+
e("Podspace Files", "put", "/api/files/{hash}/rename", "podspaceRenameEntity", "Rename a file or folder", { query: ["name!", "uniqueName"], security: "bearer" }),
|
|
4572
|
+
e("Podspace Files", "put", "/api/files/{hash}/move", "podspaceMoveEntity", "Move a file or folder", { query: ["destFolderHash!", "policy", "uniqueName"], security: "bearer" }),
|
|
4573
|
+
e("Podspace Files", "put", "/api/files/{hash}/copy", "podspaceCopyEntity", "Copy a file or folder", { query: ["destFolderHash!", "policy", "uniqueName", "copyType"], security: "bearer" }),
|
|
4574
|
+
e("Podspace Files", "delete", "/api/files/{hash}", "podspaceTrashEntity", "Move a file or folder to trash", { security: "bearer", sdkMethods: ["trashEntity", "deleteFile"] }),
|
|
4575
|
+
e("Podspace Files", "patch", "/api/files/{hash}", "podspaceUpdateFile", "Update file properties", { body: "json", bodyRequired: true, security: "bearer" }),
|
|
4576
|
+
e("Podspace Files", "get", "/api/files/search", "podspaceSearchFiles", "Search files and folders", { query: ["query", "name", "type", "start", "size", "parentHash"], security: "bearer" }),
|
|
4577
|
+
e("Podspace Files", "get", "/api/v2/files/recent", "podspaceGetRecentFiles", "List recent files", { query: ["start", "size"], security: "bearer" }),
|
|
4578
|
+
e("Podspace Files", "get", "/api/files/v2/{hash}/versions", "podspaceGetFileVersions", "List file versions", { security: "bearer" }),
|
|
4579
|
+
e("Podspace Files", "patch", "/api/files/versions/{hash}", "podspaceRestoreFileVersion", "Restore a file version", { security: "bearer" }),
|
|
4580
|
+
e("Podspace Files", "get", "/api/v2/files/{hash}/native/metadata", "podspaceGetNativeMetadata", "Get native file metadata", { security: "bearer" }),
|
|
4581
|
+
e("Podspace Files", "get", "/api/files/{hash}/convert", "podspaceConvertFile", "Convert and download a file", { query: ["format!", "password"], security: "bearer", response: "binary" }),
|
|
4582
|
+
e("Podspace Files", "get", "/api/files/{hash}/breadcrumb", "podspaceGetBreadcrumb", "Get file breadcrumbs", { security: "bearer" }),
|
|
4583
|
+
e("Podspace Files", "post", "/api/files/compress", "podspaceCompressFiles", "Compress files", { query: ["hashes!", "fileName", "parentHash"], security: "bearer" }),
|
|
4584
|
+
e("Podspace Files", "put", "/api/files/{hash}/extract", "podspaceExtractArchive", "Extract an archive", { query: ["destinationHash", "password", "overwrite"], security: "bearer" }),
|
|
4585
|
+
e("Podspace Files", "put", "/api/files/{hash}/cachePolicy", "podspaceSetCachePolicy", "Set file cache policy", { query: ["cachePolicy!"], security: "bearer" }),
|
|
4586
|
+
e("Podspace Files", "get", "/api/files/{hash}/activities", "podspaceGetActivities", "List file activities", { query: ["start", "size"], security: "bearer" }),
|
|
4587
|
+
e("Podspace Files", "get", "/api/files/{hash}/activities/{activity}", "podspaceGetActivityUsers", "List users for a file activity", { query: ["start", "size"], security: "bearer" }),
|
|
4588
|
+
e("Podspace Files", "get", "/api/files/{hash}/activities/{activity}/count", "podspaceGetActivityCount", "Count a file activity", { security: "bearer" }),
|
|
4589
|
+
// Podspace folders
|
|
4590
|
+
e("Podspace Folders", "post", "/api/folders", "podspaceCreateFolder", "Create a folder", { query: ["name!", "parentHash", "isPublic", "description"], security: "bearer" }),
|
|
4591
|
+
e("Podspace Folders", "post", "/api/folders/{hash}/directories", "podspaceCreateDirectories", "Create nested directories", { query: ["directories!"], security: "bearer" }),
|
|
4592
|
+
e("Podspace Folders", "get", "/api/folders/{hash}/children", "podspaceGetFolderChildren", "List folder children", { query: ["start", "size", "sort", "order", "type"], security: "bearer" }),
|
|
4593
|
+
e("Podspace Folders", "get", "/api/v2/folders/recent", "podspaceGetRecentFolders", "List recent folders", { query: ["start", "size"], security: "bearer" }),
|
|
4594
|
+
e("Podspace Folders", "get", "/api/folders/{hash}/check/upload", "podspaceCheckFolderUpload", "Check folder upload permission", { query: ["size"], security: "bearer" }),
|
|
4595
|
+
e("Podspace Folders", "get", "/api/folders/{folderHash}/actions", "podspaceGetFolderActions", "List allowed folder actions", { security: "bearer" }),
|
|
4596
|
+
// Podspace resumable uploads
|
|
4597
|
+
e("Podspace Resumable", "post", "/api/files/resumable", "podspaceCreateResumableUpload", "Create a resumable upload", { query: ["fileName!", "fileSize!", "parentHash", "contentType"], security: "bearer" }),
|
|
4598
|
+
e("Podspace Resumable", "patch", "/api/files/resumable/{id}", "podspaceAppendResumableChunk", "Append a resumable upload chunk", { query: ["offset!"], body: "binary", bodyRequired: true, security: "bearer" }),
|
|
4599
|
+
e("Podspace Resumable", "head", "/api/files/resumable/{id}", "podspaceGetResumableStatus", "Get resumable upload status", { security: "bearer", response: "empty" }),
|
|
4600
|
+
e("Podspace Resumable", "post", "/api/files/resumable/{id}/finalize", "podspaceFinalizeResumableUpload", "Finalize a resumable upload", { query: ["fileName", "parentHash", "isPublic"], security: "bearer" }),
|
|
4601
|
+
// Podspace links and shares
|
|
4602
|
+
e("Podspace Links", "get", "/api/links/files/{hash}", "podspaceCreateLink", "Create a public file link", { query: ["expireTime", "download", "password"], security: "bearer" }),
|
|
4603
|
+
e("Podspace Links", "get", "/api/links", "podspaceGetUserLinks", "List user links", { query: ["start", "size", "status"], security: "bearer" }),
|
|
4604
|
+
e("Podspace Links", "get", "/api/links/{link}/detail", "podspaceGetLinkDetail", "Get link details", { security: "bearer" }),
|
|
4605
|
+
e("Podspace Links", "patch", "/api/links/{link}", "podspaceUpdateLink", "Update a public link", { query: ["expireTime", "password", "download"], security: "bearer" }),
|
|
4606
|
+
e("Podspace Links", "delete", "/api/links/{link}", "podspaceRevokeLink", "Revoke a public link", { security: "bearer" }),
|
|
4607
|
+
e("Podspace Links", "get", "/api/links/{hash}", "podspaceDownloadFileByLink", "Download a file via public link", { query: ["password", "download"], security: "none", response: "binary" }),
|
|
4608
|
+
e("Podspace Shares", "post", "/api/files/{hash}/shares/users/{identity}", "podspaceShareWithUser", "Share an entity with a user", { query: ["permission!", "expireTime", "notify"], security: "bearer" }),
|
|
4609
|
+
e("Podspace Shares", "delete", "/api/files/{hash}/shares/users/{identity}", "podspaceRemoveShareWithUser", "Remove a user share", { security: "bearer" }),
|
|
4610
|
+
e("Podspace Shares", "post", "/api/files/{hash}/public", "podspaceMakePublic", "Make an entity public", { query: ["isPublic!", "password", "expireTime"], security: "bearer" }),
|
|
4611
|
+
e("Podspace Shares", "get", "/api/shares", "podspaceGetSharedWithMe", "List entities shared with the current user", { query: ["start", "size", "status"], security: "bearer" }),
|
|
4612
|
+
e("Podspace Shares", "get", "/api/shares/{shareHash}", "podspaceGetShareDetail", "Get share details", { security: "bearer" }),
|
|
4613
|
+
e("Podspace Shares", "delete", "/api/shares/{shareHash}", "podspaceRevokeShare", "Revoke a share", { security: "bearer" }),
|
|
4614
|
+
e("Podspace Shares", "get", "/api/files/{hash}/shares", "podspaceGetFileShares", "List shares for an entity", { query: ["start", "size"], security: "bearer" }),
|
|
4615
|
+
e("Podspace Shares", "put", "/api/shares/{shareHash}/password", "podspaceSetSharePassword", "Set a share password", { query: ["password!"], security: "bearer" }),
|
|
4616
|
+
e("Podspace Shares", "put", "/api/files/{entityHash}/shares/password", "podspaceSetEntityPassword", "Set an entity share password", { query: ["password!"], security: "bearer" }),
|
|
4617
|
+
// Podspace trash, tags, bookmarks and metadata
|
|
4618
|
+
e("Podspace Trash", "get", "/api/trashes", "podspaceGetTrashList", "List trash entries", { query: ["start", "size", "sort", "order"], security: "bearer" }),
|
|
4619
|
+
e("Podspace Trash", "put", "/api/trashes/{hash}/restore", "podspaceRestoreTrash", "Restore a trash entry", { security: "bearer" }),
|
|
4620
|
+
e("Podspace Trash", "post", "/api/trashes/restore", "podspaceRestoreAllTrash", "Restore all trash entries", { security: "bearer" }),
|
|
4621
|
+
e("Podspace Trash", "delete", "/api/trashes/{hash}", "podspaceDeletePermanently", "Permanently delete a trash entry", { security: "bearer" }),
|
|
4622
|
+
e("Podspace Trash", "delete", "/api/trashes", "podspaceEmptyTrash", "Empty trash", { security: "bearer" }),
|
|
4623
|
+
e("Podspace Trash", "post", "/api/trashes/periods/{period}", "podspaceSetAutoCleanupPeriod", "Set the trash auto-cleanup period", { security: "bearer" }),
|
|
4624
|
+
e("Podspace Tags", "post", "/api/tags", "podspaceAddTags", "Add tags to entities", { query: ["hashes!", "tags!"], security: "bearer" }),
|
|
4625
|
+
e("Podspace Tags", "delete", "/api/tags", "podspaceDeleteTags", "Remove tags from entities", { query: ["hashes!", "tags!"], security: "bearer" }),
|
|
4626
|
+
e("Podspace Tags", "get", "/api/tags/entities/{hash}", "podspaceGetEntityTags", "List tags for an entity", { security: "bearer" }),
|
|
4627
|
+
e("Podspace Tags", "get", "/api/tags/search/{tagName}", "podspaceSearchTags", "Search tags", { query: ["start", "size"], security: "bearer" }),
|
|
4628
|
+
e("Podspace Tags", "get", "/api/tags/{tagName}", "podspaceGetEntitiesByTag", "List entities by tag", { query: ["start", "size"], security: "bearer" }),
|
|
4629
|
+
e("Podspace Bookmarks", "get", "/api/bookmarks", "podspaceGetBookmarks", "List bookmarks", { query: ["start", "size", "sort", "order"], security: "bearer" }),
|
|
4630
|
+
e("Podspace Bookmarks", "post", "/api/bookmarks", "podspaceAddBookmark", "Add a bookmark", { query: ["hash!"], security: "bearer" }),
|
|
4631
|
+
e("Podspace Bookmarks", "delete", "/api/bookmarks", "podspaceRemoveBookmark", "Remove a bookmark", { query: ["hash!"], security: "bearer" }),
|
|
4632
|
+
e("Podspace Metadata", "get", "/api/files/{hash}/metadata", "podspaceGetMetadata", "Get custom metadata", { query: ["key"], security: "bearer" }),
|
|
4633
|
+
e("Podspace Metadata", "put", "/api/files/{hash}/metadata", "podspaceSetMetadata", "Set custom metadata", { body: "json", bodyRequired: true, security: "bearer" }),
|
|
4634
|
+
e("Podspace Metadata", "delete", "/api/files/{hash}/metadata", "podspaceDeleteMetadata", "Delete custom metadata", { query: ["keys"], security: "bearer" }),
|
|
4635
|
+
e("Podspace Metadata", "post", "/api/files/metadata/search", "podspaceSearchMetadata", "Search custom metadata", { body: "json", bodyRequired: true, security: "bearer" }),
|
|
4636
|
+
e("Podspace Metadata", "get", "/api/files/description", "podspaceGetDescription", "Get an entity description", { query: ["hash!"], security: "bearer" }),
|
|
4637
|
+
e("Podspace Metadata", "put", "/api/files/description", "podspaceSetDescription", "Set an entity description", { query: ["hash!", "description!"], security: "bearer" }),
|
|
4638
|
+
e("Podspace Metadata", "delete", "/api/files/description", "podspaceDeleteDescription", "Delete an entity description", { query: ["hash!"], security: "bearer" }),
|
|
4639
|
+
// Podspace user groups, workspaces and account
|
|
4640
|
+
e("Podspace User Groups", "post", "/api/usergroups", "podspaceCreateUserGroup", "Create a user group", { query: ["name!", "description"], security: "bearer" }),
|
|
4641
|
+
e("Podspace User Groups", "get", "/api/usergroups/{userGroupHash}", "podspaceGetUserGroup", "Get a user group", { security: "bearer" }),
|
|
4642
|
+
e("Podspace User Groups", "delete", "/api/usergroups/{userGroupHash}", "podspaceDeleteUserGroup", "Delete a user group", { security: "bearer" }),
|
|
4643
|
+
e("Podspace User Groups", "get", "/api/usergroups/{userGroupHash}/users", "podspaceGetUserGroupUsers", "List user group members", { query: ["start", "size"], security: "bearer" }),
|
|
4644
|
+
e("Podspace User Groups", "post", "/api/usergroups/{userGroupHash}/users", "podspaceAddUserToGroup", "Add a user to a group", { query: ["identity!", "role"], security: "bearer" }),
|
|
4645
|
+
e("Podspace User Groups", "delete", "/api/usergroups/{userGroupHash}/users", "podspaceRemoveUserFromGroup", "Remove a user from a group", { query: ["identity!"], security: "bearer" }),
|
|
4646
|
+
e("Podspace User Groups", "get", "/api/usergroups/{userGroupHash}/files", "podspaceGetUserGroupFiles", "List user group files", { query: ["start", "size"], security: "bearer" }),
|
|
4647
|
+
e("Podspace User Groups", "post", "/api/usergroups/{userGroupHash}/files", "podspaceUploadToUserGroup", "Upload a file to a user group", { body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4648
|
+
e("Podspace User Groups", "post", "/api/usergroups/{userGroupHash}/images", "podspaceUploadImageToUserGroup", "Upload an image to a user group", { body: "multipart", bodyRequired: true, security: "bearer" }),
|
|
4649
|
+
e("Podspace User Groups", "get", "/api/usergroups/{userGroupHash}/usage", "podspaceGetUserGroupUsage", "Get user group storage usage", { security: "bearer" }),
|
|
4650
|
+
e("Podspace Workspaces", "post", "/api/workspaces", "podspaceCreateWorkspace", "Create a workspace", { query: ["name!", "description"], security: "bearer" }),
|
|
4651
|
+
e("Podspace Workspaces", "get", "/api/workspaces/{identity}", "podspaceGetWorkspace", "Get a workspace", { query: ["identityType"], security: "bearer" }),
|
|
4652
|
+
e("Podspace Workspaces", "patch", "/api/workspaces/{identity}", "podspaceUpdateWorkspace", "Update a workspace", { query: ["name", "description"], security: "bearer" }),
|
|
4653
|
+
e("Podspace Workspaces", "get", "/api/workspaces/{identity}/members", "podspaceGetWorkspaceMembers", "List workspace members", { query: ["start", "size"], security: "bearer" }),
|
|
4654
|
+
e("Podspace Workspaces", "put", "/api/workspaces/{identity}/members/{userIdentity}", "podspaceUpdateWorkspaceMember", "Update a workspace member", { query: ["role!", "identityType"], security: "bearer" }),
|
|
4655
|
+
e("Podspace Workspaces", "delete", "/api/workspaces/{identity}/members/{userIdentity}", "podspaceRemoveWorkspaceMember", "Remove a workspace member", { query: ["identityType"], security: "bearer" }),
|
|
4656
|
+
e("Podspace Account", "get", "/api/me", "podspaceGetUser", "Get the current Podspace user", { security: "bearer" }),
|
|
4657
|
+
e("Podspace Account", "get", "/api/me/workspaces", "podspaceGetUserWorkspaces", "List current user workspaces", { query: ["start", "size"], security: "bearer" }),
|
|
4658
|
+
e("Podspace Account", "get", "/api/me/status", "podspaceGetUserStatus", "Get current user status", { security: "bearer" }),
|
|
4659
|
+
e("Podspace Account", "get", "/api/me/scope", "podspaceGetUserScope", "Get current user scopes", { security: "bearer" }),
|
|
4660
|
+
e("Podspace Account", "get", "/api/me/reports/usage", "podspaceGetUserUsageReport", "Get current user usage report", { query: ["from", "to"], security: "bearer" }),
|
|
4661
|
+
e("Podspace Account", "get", "/api/me/plans", "podspaceGetUserPlans", "List current user plans", { security: "bearer" }),
|
|
4662
|
+
e("Podspace Account", "get", "/api/me/folder", "podspaceGetPersonalFolder", "Get the personal folder", { security: "bearer" }),
|
|
4663
|
+
e("Podspace Account", "get", "/api/me/folders/chat", "podspaceGetOrCreateChatFolder", "Get or create the chat folder", { security: "bearer" }),
|
|
4664
|
+
e("Podspace Account", "get", "/api/me/avatar", "podspaceGetUserAvatar", "Download the current user avatar", { security: "bearer", response: "binary" })
|
|
4665
|
+
];
|
|
4666
|
+
var TAG_DESCRIPTIONS = {
|
|
4667
|
+
SSO: "Authentication, OTP, token and user-profile operations.",
|
|
4668
|
+
Captcha: "POD captcha generation and validation.",
|
|
4669
|
+
"Custom Post": "Custom post and metadata timeline operations.",
|
|
4670
|
+
Notification: "Notification delivery operations.",
|
|
4671
|
+
Social: "Comments and reactions.",
|
|
4672
|
+
IUMS: "IUMS RPC-style academic information operations.",
|
|
4673
|
+
PodForm: "Forms, fields, responses, templates, folders, OTP and plans.",
|
|
4674
|
+
"CMS Content": "CMS content lifecycle and discovery.",
|
|
4675
|
+
"CMS Products": "CMS product lifecycle and discovery.",
|
|
4676
|
+
"CMS Tags": "CMS tag categories and tag trees.",
|
|
4677
|
+
"Podspace Files": "File upload, download and management.",
|
|
4678
|
+
"Podspace Folders": "Folder hierarchy operations.",
|
|
4679
|
+
"Podspace Resumable": "Resumable file uploads.",
|
|
4680
|
+
"Podspace Links": "Public download links.",
|
|
4681
|
+
"Podspace Shares": "Sharing and permissions.",
|
|
4682
|
+
"Podspace Trash": "Trash and recovery.",
|
|
4683
|
+
"Podspace Tags": "File and folder tags.",
|
|
4684
|
+
"Podspace Bookmarks": "File and folder bookmarks.",
|
|
4685
|
+
"Podspace Metadata": "Custom metadata and descriptions.",
|
|
4686
|
+
"Podspace User Groups": "Team user groups and their files.",
|
|
4687
|
+
"Podspace Workspaces": "Workspace and membership operations.",
|
|
4688
|
+
"Podspace Account": "Current user, plan and quota operations."
|
|
4689
|
+
};
|
|
4690
|
+
var SERVICE_URL = {
|
|
4691
|
+
SSO: "accounts",
|
|
4692
|
+
Captcha: "cms",
|
|
4693
|
+
"Custom Post": "apiPod",
|
|
4694
|
+
Notification: "notification",
|
|
4695
|
+
Social: "apiPod",
|
|
4696
|
+
IUMS: "iums",
|
|
4697
|
+
PodForm: "podform",
|
|
4698
|
+
"CMS Content": "cms",
|
|
4699
|
+
"CMS Products": "cms",
|
|
4700
|
+
"CMS Tags": "cms",
|
|
4701
|
+
"Podspace Files": "podspace",
|
|
4702
|
+
"Podspace Folders": "podspace",
|
|
4703
|
+
"Podspace Resumable": "podspace",
|
|
4704
|
+
"Podspace Links": "podspace",
|
|
4705
|
+
"Podspace Shares": "podspace",
|
|
4706
|
+
"Podspace Trash": "podspace",
|
|
4707
|
+
"Podspace Tags": "podspace",
|
|
4708
|
+
"Podspace Bookmarks": "podspace",
|
|
4709
|
+
"Podspace Metadata": "podspace",
|
|
4710
|
+
"Podspace User Groups": "podspace",
|
|
4711
|
+
"Podspace Workspaces": "podspace",
|
|
4712
|
+
"Podspace Account": "podspace"
|
|
4713
|
+
};
|
|
4714
|
+
function securityRequirement(kind = "apiToken") {
|
|
4715
|
+
switch (kind) {
|
|
4716
|
+
case "none":
|
|
4717
|
+
return [];
|
|
4718
|
+
case "bearer":
|
|
4719
|
+
return [{ BearerAuth: [] }];
|
|
4720
|
+
case "basic":
|
|
4721
|
+
return [{ BasicAuth: [] }];
|
|
4722
|
+
case "clientId":
|
|
4723
|
+
return [{ ClientId: [] }];
|
|
4724
|
+
case "podFormToken":
|
|
4725
|
+
return [{ PodFormToken: [] }];
|
|
4726
|
+
case "cmsPublic":
|
|
4727
|
+
return [{ ClientId: [] }];
|
|
4728
|
+
case "cmsManage":
|
|
4729
|
+
return [{ ClientId: [], CmsAccessToken: [] }];
|
|
4730
|
+
case "signature":
|
|
4731
|
+
return [{ SignatureAuth: [] }];
|
|
4732
|
+
default:
|
|
4733
|
+
return [{ PodApiToken: [] }];
|
|
4734
|
+
}
|
|
4735
|
+
}
|
|
4736
|
+
function pathParameters(path) {
|
|
4737
|
+
return Array.from(path.matchAll(/\{([^}]+)\}/g), ([, name]) => ({
|
|
4738
|
+
name,
|
|
4739
|
+
in: "path",
|
|
4740
|
+
required: true,
|
|
4741
|
+
schema: /(^id$|Id$|entityId$|period$)/.test(name) ? { type: "integer" } : { type: "string" }
|
|
4742
|
+
}));
|
|
4743
|
+
}
|
|
4744
|
+
function queryParameters(query = []) {
|
|
4745
|
+
return query.map((rawName) => {
|
|
4746
|
+
const required = rawName.endsWith("!");
|
|
4747
|
+
const name = required ? rawName.slice(0, -1) : rawName;
|
|
4748
|
+
const arrayLike = /^(hashes|tags|keys|fieldIds|responseIds|directories)$/.test(name);
|
|
4749
|
+
const booleanLike = /^(enable|showDetail|lockForEdit|removeFromTrash|isPublic|uniqueName|download|breadcrumb|nativeMetadata|includeSizeAndCount|notify|overwrite|dislike|newVersion|includeCurrent)$/.test(name);
|
|
4750
|
+
const integerLike = /^(offset|start|size|page|width|height|quality|period|fileSize)$/.test(name);
|
|
4751
|
+
return {
|
|
4752
|
+
name,
|
|
4753
|
+
in: "query",
|
|
4754
|
+
required,
|
|
4755
|
+
schema: arrayLike ? { type: "array", items: { type: "string" } } : booleanLike ? { type: "boolean" } : integerLike ? { type: "integer" } : { type: "string" }
|
|
4756
|
+
};
|
|
4757
|
+
});
|
|
4758
|
+
}
|
|
4759
|
+
function requestBody(kind, required = false) {
|
|
4760
|
+
if (!kind) return void 0;
|
|
4761
|
+
const contentType = kind === "form" ? "application/x-www-form-urlencoded" : kind === "multipart" ? "multipart/form-data" : kind === "binary" ? "application/octet-stream" : "application/json";
|
|
4762
|
+
const schema = kind === "binary" ? { type: "string", format: "binary" } : kind === "multipart" ? { $ref: "#/components/schemas/MultipartUpload" } : { $ref: "#/components/schemas/GenericObject" };
|
|
4763
|
+
return { required, content: { [contentType]: { schema } } };
|
|
4764
|
+
}
|
|
4765
|
+
function responses(kind = "json") {
|
|
4766
|
+
const success = kind === "binary" ? { description: "Binary response", content: { "application/octet-stream": { schema: { type: "string", format: "binary" } } } } : kind === "empty" ? { description: "Successful response" } : { description: "Successful response", content: { "application/json": { schema: { $ref: "#/components/schemas/ApiResponse" } } } };
|
|
4767
|
+
return {
|
|
4768
|
+
"200": success,
|
|
4769
|
+
"400": { $ref: "#/components/responses/BadRequest" },
|
|
4770
|
+
"401": { $ref: "#/components/responses/Unauthorized" },
|
|
4771
|
+
"500": { $ref: "#/components/responses/ServerError" }
|
|
4772
|
+
};
|
|
4773
|
+
}
|
|
4774
|
+
function createPodOpenApiDocument(options = {}) {
|
|
4775
|
+
const urls = resolvePodUrls(options.urls, options.sandbox);
|
|
4776
|
+
const paths = {};
|
|
4777
|
+
for (const endpoint of POD_OPENAPI_ENDPOINTS) {
|
|
4778
|
+
const parameters = [...pathParameters(endpoint.path), ...queryParameters(endpoint.query)];
|
|
4779
|
+
const operation = {
|
|
4780
|
+
tags: [endpoint.tag],
|
|
4781
|
+
summary: endpoint.summary,
|
|
4782
|
+
operationId: endpoint.operationId,
|
|
4783
|
+
security: securityRequirement(endpoint.security),
|
|
4784
|
+
servers: [{ url: urls[SERVICE_URL[endpoint.tag]] }],
|
|
4785
|
+
responses: responses(endpoint.response),
|
|
4786
|
+
"x-sdk-methods": endpoint.sdkMethods || [endpoint.operationId.replace(/^[a-z]+/, (value) => value)]
|
|
4787
|
+
};
|
|
4788
|
+
if (parameters.length) operation.parameters = parameters;
|
|
4789
|
+
const body = requestBody(endpoint.body, endpoint.bodyRequired);
|
|
4790
|
+
if (body) operation.requestBody = body;
|
|
4791
|
+
if (endpoint.deprecated) operation.deprecated = true;
|
|
4792
|
+
paths[endpoint.path] ||= {};
|
|
4793
|
+
if (paths[endpoint.path][endpoint.method]) {
|
|
4794
|
+
throw new Error(`Duplicate OpenAPI operation: ${endpoint.method.toUpperCase()} ${endpoint.path}`);
|
|
4795
|
+
}
|
|
4796
|
+
paths[endpoint.path][endpoint.method] = operation;
|
|
4797
|
+
}
|
|
4798
|
+
return {
|
|
4799
|
+
openapi: "3.0.3",
|
|
4800
|
+
info: {
|
|
4801
|
+
title: options.title || "POD SDK Services API",
|
|
4802
|
+
version: options.version || "1.0.10",
|
|
4803
|
+
description: "Swagger/OpenAPI documentation for every remote HTTP operation exposed by @rezamirzapour/pod-sdk.",
|
|
4804
|
+
license: { name: "MIT", url: "https://opensource.org/licenses/MIT" }
|
|
4805
|
+
},
|
|
4806
|
+
tags: Object.entries(TAG_DESCRIPTIONS).map(([name, description]) => ({ name, description })),
|
|
4807
|
+
paths,
|
|
4808
|
+
components: {
|
|
4809
|
+
securitySchemes: {
|
|
4810
|
+
PodApiToken: { type: "apiKey", in: "header", name: "_token_", description: "POD API token." },
|
|
4811
|
+
BearerAuth: { type: "http", scheme: "bearer", bearerFormat: "POD token" },
|
|
4812
|
+
BasicAuth: { type: "http", scheme: "basic" },
|
|
4813
|
+
SignatureAuth: { type: "apiKey", in: "header", name: "Authorization", description: "Signature generated by the SSO handshake key." },
|
|
4814
|
+
ClientId: { type: "apiKey", in: "header", name: "Client-Id" },
|
|
4815
|
+
CmsAccessToken: { type: "apiKey", in: "header", name: "Access-Token" },
|
|
4816
|
+
PodFormToken: { type: "apiKey", in: "header", name: "token" }
|
|
4817
|
+
},
|
|
4818
|
+
schemas: {
|
|
4819
|
+
GenericObject: { type: "object", additionalProperties: true },
|
|
4820
|
+
MultipartUpload: {
|
|
4821
|
+
type: "object",
|
|
4822
|
+
properties: { file: { type: "string", format: "binary" }, files: { type: "array", items: { type: "string", format: "binary" } } },
|
|
4823
|
+
additionalProperties: true
|
|
4824
|
+
},
|
|
4825
|
+
ApiResponse: {
|
|
4826
|
+
type: "object",
|
|
4827
|
+
properties: {
|
|
4828
|
+
hasError: { type: "boolean" },
|
|
4829
|
+
result: {},
|
|
4830
|
+
message: { type: "string" },
|
|
4831
|
+
errorCode: { type: "integer" },
|
|
4832
|
+
count: { type: "integer" },
|
|
4833
|
+
referenceNumber: { type: "string" }
|
|
4834
|
+
},
|
|
4835
|
+
additionalProperties: true
|
|
4836
|
+
},
|
|
4837
|
+
ErrorResponse: {
|
|
4838
|
+
type: "object",
|
|
4839
|
+
properties: { hasError: { type: "boolean", example: true }, message: { type: "string" }, errorCode: { type: "integer" } },
|
|
4840
|
+
additionalProperties: true
|
|
4841
|
+
}
|
|
4842
|
+
},
|
|
4843
|
+
responses: {
|
|
4844
|
+
BadRequest: { description: "Invalid request", content: { "application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } } } },
|
|
4845
|
+
Unauthorized: { description: "Authentication failed", content: { "application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } } } },
|
|
4846
|
+
ServerError: { description: "Remote service error", content: { "application/json": { schema: { $ref: "#/components/schemas/ErrorResponse" } } } }
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
};
|
|
4850
|
+
}
|
|
4851
|
+
var POD_OPENAPI_DOCUMENT = createPodOpenApiDocument();
|
|
4852
|
+
var podSwaggerDocument = POD_OPENAPI_DOCUMENT;
|
|
4853
|
+
|
|
4854
|
+
export { CaptchaService, CmsDataFormatter, CmsProductService, CmsService, CmsTagService, CustomPostCrudService, CustomPostService, DEFAULT_POD_URLS, IumsService, NotificationService, POD_OPENAPI_DOCUMENT, POD_OPENAPI_ENDPOINTS, PodFormService, PodSdk, PodspaceBookmarksService, PodspaceFilesService, PodspaceFoldersService, PodspaceLinksService, PodspaceMeService, PodspaceMetadataService, PodspaceResumableService, PodspaceService, PodspaceSharesService, PodspaceTagsService, PodspaceTrashService, PodspaceUploadDownloadService, PodspaceUserGroupsService, PodspaceWorkspacesService, SANDBOX_POD_URLS, SocialService, SsoService, createPodOpenApiDocument, createPodSdk, client_default as default, encodeBase64, generatePodSignatureHeader, podSwaggerDocument, resolvePodUrls };
|
|
4309
4855
|
//# sourceMappingURL=index.mjs.map
|
|
4310
4856
|
//# sourceMappingURL=index.mjs.map
|