@gofynd/fdk-client-javascript 1.0.3 → 1.0.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 +31 -2
- package/index.d.ts +4 -4
- package/index.js +9 -10
- package/package.json +14 -14
- package/sdk/APIClient.d.ts +11 -0
- package/sdk/APIClient.js +35 -0
- package/sdk/Client.d.ts +6 -0
- package/sdk/Client.js +17 -0
- package/sdk/Config.d.ts +9 -0
- package/sdk/Config.js +17 -0
- package/sdk/application/Cart/CartApplicationClient.js +29 -28
- package/sdk/application/Cart/CartApplicationModel.js +3 -1
- package/sdk/application/Catalog/CatalogApplicationClient.js +43 -42
- package/sdk/application/Catalog/CatalogApplicationModel.js +1 -1
- package/sdk/application/Common/CommonApplicationClient.js +5 -4
- package/sdk/application/Communication/CommunicationApplicationClient.js +6 -5
- package/sdk/application/Configuration/ConfigurationApplicationClient.js +21 -20
- package/sdk/application/Content/ContentApplicationClient.js +26 -25
- package/sdk/application/Content/ContentApplicationModel.js +1 -0
- package/sdk/application/FileStorage/FileStorageApplicationClient.js +6 -5
- package/sdk/application/Lead/LeadApplicationClient.js +10 -9
- package/sdk/application/Logistic/LogisticApplicationClient.d.ts +1 -3
- package/sdk/application/Logistic/LogisticApplicationClient.js +11 -12
- package/sdk/application/Logistic/LogisticApplicationValidator.js +0 -1
- package/sdk/application/Order/OrderApplicationClient.js +15 -14
- package/sdk/application/Order/OrderApplicationModel.js +9 -0
- package/sdk/application/Payment/PaymentApplicationClient.js +42 -41
- package/sdk/application/PosCart/PosCartApplicationClient.js +30 -29
- package/sdk/application/PosCart/PosCartApplicationModel.js +3 -1
- package/sdk/application/Rewards/RewardsApplicationClient.js +11 -10
- package/sdk/application/Share/ShareApplicationClient.js +10 -9
- package/sdk/application/Theme/ThemeApplicationClient.js +7 -6
- package/sdk/application/User/UserApplicationClient.js +38 -37
- package/sdk/common/AxiosHelper.js +17 -6
- package/sdk/constructUrl.d.ts +5 -0
- package/sdk/constructUrl.js +13 -0
- package/sdk/index.d.ts +3 -0
- package/sdk/index.js +5 -0
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +3 -1
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Analytics/AnalyticsPlatformClient.js +5 -4
- package/sdk/platform/Analytics/AnalyticsPlatformValidator.js +1 -0
- package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +3 -2
- package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +1 -0
- package/sdk/platform/Billing/BillingPlatformClient.js +3 -2
- package/sdk/platform/Billing/BillingPlatformValidator.js +1 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +27 -0
- package/sdk/platform/Cart/CartPlatformApplicationClient.js +177 -1
- package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +3 -0
- package/sdk/platform/Cart/CartPlatformApplicationValidator.js +17 -1
- package/sdk/platform/Cart/CartPlatformModel.js +7 -3
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +3 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +2 -2
- package/sdk/platform/Catalog/CatalogPlatformClient.js +6 -9
- package/sdk/platform/Catalog/CatalogPlatformModel.js +7 -7
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +2 -1
- package/sdk/platform/Common/CommonPlatformClient.js +7 -18
- package/sdk/platform/Common/CommonPlatformValidator.js +1 -0
- package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3 -1
- package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Communication/CommunicationPlatformClient.js +4 -3
- package/sdk/platform/Communication/CommunicationPlatformValidator.js +1 -0
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +5 -4
- package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +1 -0
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -1
- package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Configuration/ConfigurationPlatformClient.js +9 -8
- package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +1 -0
- package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +0 -10
- package/sdk/platform/Content/ContentPlatformApplicationClient.js +3 -62
- package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +0 -1
- package/sdk/platform/Content/ContentPlatformApplicationValidator.js +1 -7
- package/sdk/platform/Content/ContentPlatformModel.js +1 -0
- package/sdk/platform/Discount/DiscountPlatformClient.js +3 -2
- package/sdk/platform/Discount/DiscountPlatformValidator.js +1 -0
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +27 -5
- package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +1 -1
- package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +3 -3
- package/sdk/platform/FileStorage/FileStoragePlatformClient.js +28 -6
- package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +1 -0
- package/sdk/platform/Inventory/InventoryPlatformClient.js +3 -2
- package/sdk/platform/Inventory/InventoryPlatformValidator.js +1 -0
- package/sdk/platform/Lead/LeadPlatformApplicationClient.js +3 -1
- package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Lead/LeadPlatformClient.js +4 -3
- package/sdk/platform/Lead/LeadPlatformValidator.js +1 -0
- package/sdk/platform/Order/OrderPlatformApplicationClient.js +3 -1
- package/sdk/platform/Order/OrderPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Order/OrderPlatformClient.d.ts +1 -1
- package/sdk/platform/Order/OrderPlatformClient.js +16 -3
- package/sdk/platform/Order/OrderPlatformModel.js +1 -0
- package/sdk/platform/Order/OrderPlatformValidator.js +1 -0
- package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +3 -1
- package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +1 -1
- package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +14 -14
- package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Payment/PaymentPlatformClient.js +3 -2
- package/sdk/platform/Payment/PaymentPlatformValidator.js +1 -0
- package/sdk/platform/PlatformClient.d.ts +13 -9
- package/sdk/platform/PlatformClient.js +13 -9
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +4 -4
- package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +36 -17
- package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Share/SharePlatformApplicationClient.js +3 -1
- package/sdk/platform/Share/SharePlatformApplicationValidator.js +1 -1
- package/sdk/platform/Theme/ThemePlatformApplicationClient.js +3 -1
- package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +1 -1
- package/sdk/platform/User/UserPlatformApplicationClient.js +3 -1
- package/sdk/platform/User/UserPlatformApplicationValidator.js +1 -1
- package/sdk/platform/Webhook/WebhookPlatformClient.js +3 -2
- package/sdk/platform/Webhook/WebhookPlatformValidator.js +1 -0
- package/sdk/public/Configuration/ConfigurationPublicClient.js +2 -0
- package/sdk/public/Inventory/InventoryPublicClient.js +2 -0
- package/sdk/public/Webhook/WebhookPublicClient.js +2 -0
- package/.github/workflows/on_create_release.yml +0 -23
- package/.github/workflows/on_merge_main.yml +0 -38
- package/.github/workflows/on_pull_request.yml +0 -35
- package/.prettierrc +0 -5
- package/documentation/application/CART.md +0 -8771
- package/documentation/application/CATALOG.md +0 -8690
- package/documentation/application/COMMON.md +0 -325
- package/documentation/application/COMMUNICATION.md +0 -387
- package/documentation/application/CONFIGURATION.md +0 -2212
- package/documentation/application/CONTENT.md +0 -2629
- package/documentation/application/FILESTORAGE.md +0 -442
- package/documentation/application/LEAD.md +0 -1549
- package/documentation/application/LOGISTIC.md +0 -689
- package/documentation/application/ORDER.md +0 -2937
- package/documentation/application/PAYMENT.md +0 -4475
- package/documentation/application/POSCART.md +0 -9375
- package/documentation/application/README.md +0 -21
- package/documentation/application/REWARDS.md +0 -554
- package/documentation/application/SHARE.md +0 -635
- package/documentation/application/THEME.md +0 -5517
- package/documentation/application/USER.md +0 -3798
- package/documentation/platform/ANALYTICS.md +0 -1012
- package/documentation/platform/AUDITTRAIL.md +0 -493
- package/documentation/platform/BILLING.md +0 -1889
- package/documentation/platform/CART.md +0 -4711
- package/documentation/platform/CATALOG.md +0 -20522
- package/documentation/platform/COMMON.md +0 -325
- package/documentation/platform/COMMUNICATION.md +0 -4970
- package/documentation/platform/COMPANYPROFILE.md +0 -1646
- package/documentation/platform/CONFIGURATION.md +0 -6316
- package/documentation/platform/CONTENT.md +0 -8364
- package/documentation/platform/DISCOUNT.md +0 -767
- package/documentation/platform/FILESTORAGE.md +0 -945
- package/documentation/platform/INVENTORY.md +0 -1136
- package/documentation/platform/LEAD.md +0 -4394
- package/documentation/platform/ORDER.md +0 -6525
- package/documentation/platform/PARTNER.md +0 -193
- package/documentation/platform/PAYMENT.md +0 -3138
- package/documentation/platform/README.md +0 -27
- package/documentation/platform/REWARDS.md +0 -919
- package/documentation/platform/SHARE.md +0 -513
- package/documentation/platform/THEME.md +0 -35446
- package/documentation/platform/USER.md +0 -2174
- package/documentation/platform/WEBHOOK.md +0 -485
- package/documentation/public/CONFIGURATION.md +0 -325
- package/documentation/public/INVENTORY.md +0 -508
- package/documentation/public/WEBHOOK.md +0 -246
- package/jest.config.d.ts +0 -4
- package/jest.config.js +0 -6
- package/tests/application/catalog.spec.js +0 -54
- package/tests/common/action-url.spec.js +0 -35
- package/tests/common/schema/action-url.json +0 -178
- package/tests/common/schema/url-action.json +0 -683
- package/tests/common/url-action.spec.js +0 -48
- package/tests/helpers/cookie.helper.js +0 -31
- package/tests/helpers/oauth.helper.js +0 -43
- package/tests/platform/catalog.spec.js +0 -49
- package/tests/public/location.spec.js +0 -39
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const Paginator = require("../../common/Paginator");
|
|
2
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
3
2
|
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const UserValidator = require("./UserPlatformApplicationValidator");
|
|
5
5
|
const UserModel = require("./UserPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
const Joi = require("joi");
|
|
7
8
|
|
|
8
9
|
class User {
|
|
9
10
|
constructor(config, applicationId) {
|
|
@@ -1090,4 +1091,5 @@ class User {
|
|
|
1090
1091
|
return response;
|
|
1091
1092
|
}
|
|
1092
1093
|
}
|
|
1094
|
+
|
|
1093
1095
|
module.exports = User;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const Paginator = require("../../common/Paginator");
|
|
2
|
-
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
1
|
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
+
const { FDKClientValidationError } = require("../../common/FDKError");
|
|
3
|
+
const Paginator = require("../../common/Paginator");
|
|
4
4
|
const WebhookValidator = require("./WebhookPlatformValidator");
|
|
5
5
|
const WebhookModel = require("./WebhookPlatformModel");
|
|
6
6
|
const { Logger } = require("./../../common/Logger");
|
|
7
|
+
const Joi = require("joi");
|
|
7
8
|
|
|
8
9
|
class Webhook {
|
|
9
10
|
constructor(config) {
|
|
@@ -5,6 +5,7 @@ const Paginator = require("../../common/Paginator");
|
|
|
5
5
|
const ConfigurationValidator = require("./ConfigurationPublicValidator");
|
|
6
6
|
const ConfigurationModel = require("./ConfigurationPublicModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Configuration {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -167,4 +168,5 @@ class Configuration {
|
|
|
167
168
|
return response;
|
|
168
169
|
}
|
|
169
170
|
}
|
|
171
|
+
|
|
170
172
|
module.exports = Configuration;
|
|
@@ -5,6 +5,7 @@ const Paginator = require("../../common/Paginator");
|
|
|
5
5
|
const InventoryValidator = require("./InventoryPublicValidator");
|
|
6
6
|
const InventoryModel = require("./InventoryPublicModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Inventory {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -434,4 +435,5 @@ class Inventory {
|
|
|
434
435
|
return response;
|
|
435
436
|
}
|
|
436
437
|
}
|
|
438
|
+
|
|
437
439
|
module.exports = Inventory;
|
|
@@ -5,6 +5,7 @@ const Paginator = require("../../common/Paginator");
|
|
|
5
5
|
const WebhookValidator = require("./WebhookPublicValidator");
|
|
6
6
|
const WebhookModel = require("./WebhookPublicModel");
|
|
7
7
|
const { Logger } = require("./../../common/Logger");
|
|
8
|
+
const Joi = require("joi");
|
|
8
9
|
|
|
9
10
|
class Webhook {
|
|
10
11
|
constructor(_conf) {
|
|
@@ -159,4 +160,5 @@ class Webhook {
|
|
|
159
160
|
return response;
|
|
160
161
|
}
|
|
161
162
|
}
|
|
163
|
+
|
|
162
164
|
module.exports = Webhook;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
release:
|
|
3
|
-
types: [created]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
|
|
7
|
-
publish-npm:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v3
|
|
12
|
-
- uses: actions/setup-node@v3
|
|
13
|
-
with:
|
|
14
|
-
node-version: 16
|
|
15
|
-
registry-url: https://registry.npmjs.org/
|
|
16
|
-
- uses: jaywcjlove/github-action-package@main
|
|
17
|
-
with:
|
|
18
|
-
version: ${{ github.ref_name }}
|
|
19
|
-
rename: "@gofynd/fdk-client-javascript"
|
|
20
|
-
- run: npm ci
|
|
21
|
-
- run: npm publish --access public
|
|
22
|
-
env:
|
|
23
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: Merge CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ main ]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
build:
|
|
9
|
-
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
node-version: [12.x, 14.x, 15.x]
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v2
|
|
18
|
-
|
|
19
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
20
|
-
uses: actions/setup-node@v1
|
|
21
|
-
with:
|
|
22
|
-
node-version: ${{ matrix.node-version }}
|
|
23
|
-
|
|
24
|
-
- name: npm install, npm test
|
|
25
|
-
run: |
|
|
26
|
-
npm install
|
|
27
|
-
npm test
|
|
28
|
-
env:
|
|
29
|
-
API_KEY: ${{ secrets.API_KEY }}
|
|
30
|
-
API_SECRET: ${{ secrets.API_SECRET }}
|
|
31
|
-
APP_USERNAME: ${{ secrets.APP_USERNAME }}
|
|
32
|
-
PASSWORD: ${{ secrets.PASSWORD }}
|
|
33
|
-
AUTH_HEADER: ${{ secrets.AUTH_HEADER}}
|
|
34
|
-
|
|
35
|
-
- name: Coveralls (Uploading test report)
|
|
36
|
-
uses: coverallsapp/github-action@master
|
|
37
|
-
with:
|
|
38
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Pull Request CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ fyndx0 ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ main ]
|
|
8
|
-
|
|
9
|
-
jobs:
|
|
10
|
-
build:
|
|
11
|
-
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
node-version: [12.x, 14.x, 15.x]
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- uses: actions/checkout@v2
|
|
20
|
-
|
|
21
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
22
|
-
uses: actions/setup-node@v1
|
|
23
|
-
with:
|
|
24
|
-
node-version: ${{ matrix.node-version }}
|
|
25
|
-
|
|
26
|
-
- name: npm install, npm test
|
|
27
|
-
run: |
|
|
28
|
-
npm install
|
|
29
|
-
npm test
|
|
30
|
-
env:
|
|
31
|
-
API_KEY: ${{ secrets.API_KEY }}
|
|
32
|
-
API_SECRET: ${{ secrets.API_SECRET }}
|
|
33
|
-
APP_USERNAME: ${{ secrets.APP_USERNAME }}
|
|
34
|
-
PASSWORD: ${{ secrets.PASSWORD }}
|
|
35
|
-
AUTH_HEADER: ${{ secrets.AUTH_HEADER}}
|