@hw-agconnect/cloud-server 1.0.1
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 +258 -0
- package/auth-service/agconnect-auth.json +7 -0
- package/auth-service/auth.d.ts +48 -0
- package/auth-service/auth.js +1 -0
- package/auth-service/backend/auth-backend.d.ts +11 -0
- package/auth-service/backend/auth-backend.js +1 -0
- package/auth-service/entity/auth-access-token-impl.d.ts +67 -0
- package/auth-service/entity/auth-access-token-impl.js +1 -0
- package/auth-service/entity/auth-access-token.d.ts +54 -0
- package/auth-service/entity/auth-access-token.js +1 -0
- package/auth-service/entity/provider.d.ts +17 -0
- package/auth-service/entity/provider.js +1 -0
- package/auth-service/entity/token-provider-info.d.ts +18 -0
- package/auth-service/entity/token-provider-info.js +1 -0
- package/auth-service/entity/user-import-export-result.d.ts +33 -0
- package/auth-service/entity/user-import-export-result.js +1 -0
- package/auth-service/error/agc-auth-error-message.d.ts +39 -0
- package/auth-service/error/agc-auth-error-message.js +1 -0
- package/auth-service/error/agc-auth-error.d.ts +7 -0
- package/auth-service/error/agc-auth-error.js +1 -0
- package/auth-service/index.d.ts +13 -0
- package/auth-service/index.js +1 -0
- package/auth-service/jwt/agc-auth-jwt.d.ts +17 -0
- package/auth-service/jwt/agc-auth-jwt.js +1 -0
- package/auth-service/jwt/agc-auth-jwttoken.d.ts +10 -0
- package/auth-service/jwt/agc-auth-jwttoken.js +1 -0
- package/auth-service/jwt/agc-auth-public-keys-manager.d.ts +4 -0
- package/auth-service/jwt/agc-auth-public-keys-manager.js +1 -0
- package/auth-service/jwt/agc-auth-rsa-verifier.d.ts +6 -0
- package/auth-service/jwt/agc-auth-rsa-verifier.js +1 -0
- package/auth-service/jwt/rsa-key-pair.d.ts +15 -0
- package/auth-service/jwt/rsa-key-pair.js +1 -0
- package/auth-service/params/fileParams.d.ts +6 -0
- package/auth-service/params/fileParams.js +1 -0
- package/auth-service/params/index.d.ts +7 -0
- package/auth-service/params/index.js +1 -0
- package/auth-service/params/signParams.d.ts +9 -0
- package/auth-service/params/signParams.js +1 -0
- package/auth-service/params/tokenParams.d.ts +7 -0
- package/auth-service/params/tokenParams.js +1 -0
- package/auth-service/params/uidParams.d.ts +6 -0
- package/auth-service/params/uidParams.js +1 -0
- package/auth-service/request/export-user-list-req.d.ts +13 -0
- package/auth-service/request/export-user-list-req.js +1 -0
- package/auth-service/request/export-user-req.d.ts +13 -0
- package/auth-service/request/export-user-req.js +1 -0
- package/auth-service/request/import-export-user-info.d.ts +40 -0
- package/auth-service/request/import-export-user-info.js +1 -0
- package/auth-service/request/import-user-req.d.ts +14 -0
- package/auth-service/request/import-user-req.js +1 -0
- package/auth-service/request/provider-info.d.ts +20 -0
- package/auth-service/request/provider-info.js +1 -0
- package/auth-service/request/public-key-req.d.ts +9 -0
- package/auth-service/request/public-key-req.js +1 -0
- package/auth-service/request/revoke-token-req.d.ts +13 -0
- package/auth-service/request/revoke-token-req.js +1 -0
- package/auth-service/request/verify-token-req.d.ts +13 -0
- package/auth-service/request/verify-token-req.js +1 -0
- package/auth-service/response/auth-operate-rsp.d.ts +7 -0
- package/auth-service/response/auth-operate-rsp.js +1 -0
- package/auth-service/response/export-user-list-rsp.d.ts +13 -0
- package/auth-service/response/export-user-list-rsp.js +1 -0
- package/auth-service/response/export-user-rsp.d.ts +14 -0
- package/auth-service/response/export-user-rsp.js +1 -0
- package/auth-service/response/import-success-user.d.ts +11 -0
- package/auth-service/response/import-success-user.js +1 -0
- package/auth-service/response/import-user-rsp.d.ts +11 -0
- package/auth-service/response/import-user-rsp.js +1 -0
- package/auth-service/response/publickey-rsp.d.ts +9 -0
- package/auth-service/response/publickey-rsp.js +1 -0
- package/auth-service/response/token-info.d.ts +11 -0
- package/auth-service/response/token-info.js +1 -0
- package/auth-service/response/verify-token-rsp.d.ts +14 -0
- package/auth-service/response/verify-token-rsp.js +1 -0
- package/auth-service/service/agc-auth.d.ts +4 -0
- package/auth-service/service/agc-auth.js +1 -0
- package/auth-service/service/impl/agc-auth-service-impl.d.ts +46 -0
- package/auth-service/service/impl/agc-auth-service-impl.js +1 -0
- package/auth-service/service/impl/agc-auth-service.d.ts +54 -0
- package/auth-service/service/impl/agc-auth-service.js +1 -0
- package/auth-service/utils/auth-service-api-util.d.ts +11 -0
- package/auth-service/utils/auth-service-api-util.js +1 -0
- package/auth-service/utils/key-header-util.d.ts +19 -0
- package/auth-service/utils/key-header-util.js +1 -0
- package/cloud.d.ts +24 -0
- package/cloud.js +1 -0
- package/common-server/agc-client/agc-client.d.ts +41 -0
- package/common-server/agc-client/agc-client.js +1 -0
- package/common-server/agconnect-common.json +29 -0
- package/common-server/config/cloud-gw-url-util.d.ts +7 -0
- package/common-server/config/cloud-gw-url-util.js +1 -0
- package/common-server/config/configService.d.ts +12 -0
- package/common-server/config/configService.js +1 -0
- package/common-server/credential-service/access-token.d.ts +11 -0
- package/common-server/credential-service/access-token.js +1 -0
- package/common-server/credential-service/clientid-credential.d.ts +27 -0
- package/common-server/credential-service/clientid-credential.js +1 -0
- package/common-server/credential-service/credential-parser.d.ts +23 -0
- package/common-server/credential-service/credential-parser.js +1 -0
- package/common-server/credential-service/credential-service.d.ts +41 -0
- package/common-server/credential-service/credential-service.js +1 -0
- package/common-server/credential-service/credential-type.d.ts +7 -0
- package/common-server/credential-service/credential-type.js +1 -0
- package/common-server/error/error-message.d.ts +30 -0
- package/common-server/error/error-message.js +1 -0
- package/common-server/error/error.d.ts +36 -0
- package/common-server/error/error.js +1 -0
- package/common-server/http-client/base-response.d.ts +11 -0
- package/common-server/http-client/base-response.js +1 -0
- package/common-server/http-client/common-headers.d.ts +37 -0
- package/common-server/http-client/common-headers.js +1 -0
- package/common-server/http-client/connect-ret.d.ts +12 -0
- package/common-server/http-client/connect-ret.js +1 -0
- package/common-server/http-client/http-client.d.ts +5 -0
- package/common-server/http-client/http-client.js +1 -0
- package/common-server/http-client/http-clinet-api.d.ts +66 -0
- package/common-server/http-client/http-clinet-api.js +1 -0
- package/common-server/http-client/request-constructor.d.ts +8 -0
- package/common-server/http-client/request-constructor.js +1 -0
- package/common-server/index.d.ts +19 -0
- package/common-server/index.js +1 -0
- package/common-server/service/agc-service.d.ts +14 -0
- package/common-server/service/agc-service.js +1 -0
- package/common-server/service/service-factory.d.ts +9 -0
- package/common-server/service/service-factory.js +1 -0
- package/common-server/utils/utils.d.ts +4 -0
- package/common-server/utils/utils.js +1 -0
- package/database-service/CloudDB.d.ts +13 -0
- package/database-service/CloudDB.js +1 -0
- package/database-service/CloudDBCollection.d.ts +108 -0
- package/database-service/CloudDBCollection.js +1 -0
- package/database-service/agconnect-database.json +4 -0
- package/database-service/communicator/https/HttpsCommunicator.d.ts +69 -0
- package/database-service/communicator/https/HttpsCommunicator.js +1 -0
- package/database-service/communicator/https/RequestHeader.d.ts +13 -0
- package/database-service/communicator/https/RequestHeader.js +1 -0
- package/database-service/exception/AGConnectCloudDBException.d.ts +10 -0
- package/database-service/exception/AGConnectCloudDBException.js +1 -0
- package/database-service/exception/CloudDBErrorCode.d.ts +672 -0
- package/database-service/exception/CloudDBErrorCode.js +1 -0
- package/database-service/exception/ErrorCodeMessage.d.ts +1 -0
- package/database-service/exception/ErrorCodeMessage.js +1 -0
- package/database-service/index.d.ts +14 -0
- package/database-service/index.js +1 -0
- package/database-service/model/DatabaseConfig.d.ts +7 -0
- package/database-service/model/DatabaseConfig.js +1 -0
- package/database-service/model/index.d.ts +4 -0
- package/database-service/model/index.js +1 -0
- package/database-service/query/CloudDBZoneConfig.d.ts +23 -0
- package/database-service/query/CloudDBZoneConfig.js +1 -0
- package/database-service/query/CloudDBZoneObjectOperator.d.ts +39 -0
- package/database-service/query/CloudDBZoneObjectOperator.js +1 -0
- package/database-service/query/CloudDBZoneObjectOperatorConstraint.d.ts +127 -0
- package/database-service/query/CloudDBZoneObjectOperatorConstraint.js +1 -0
- package/database-service/query/CloudDBZoneQuery.d.ts +188 -0
- package/database-service/query/CloudDBZoneQuery.js +1 -0
- package/database-service/query/CloudDBZoneSnapshot.d.ts +16 -0
- package/database-service/query/CloudDBZoneSnapshot.js +1 -0
- package/database-service/request/CloudDBZoneGenericObject.d.ts +58 -0
- package/database-service/request/CloudDBZoneGenericObject.js +1 -0
- package/database-service/services/AGConnectCloudDB.d.ts +63 -0
- package/database-service/services/AGConnectCloudDB.js +1 -0
- package/database-service/services/CloudDBService.d.ts +75 -0
- package/database-service/services/CloudDBService.js +1 -0
- package/database-service/services/CloudDBZone.d.ts +254 -0
- package/database-service/services/CloudDBZone.js +1 -0
- package/database-service/services/Transaction.d.ts +73 -0
- package/database-service/services/Transaction.js +1 -0
- package/database-service/utils/AggregareType.d.ts +10 -0
- package/database-service/utils/AggregareType.js +1 -0
- package/database-service/utils/CloudDBSdkUtils.d.ts +30 -0
- package/database-service/utils/CloudDBSdkUtils.js +1 -0
- package/database-service/utils/ConditionType.d.ts +26 -0
- package/database-service/utils/ConditionType.js +1 -0
- package/database-service/utils/ConditionValidate.d.ts +40 -0
- package/database-service/utils/ConditionValidate.js +1 -0
- package/database-service/utils/Constant.d.ts +9 -0
- package/database-service/utils/Constant.js +1 -0
- package/database-service/utils/DataModelHelper.d.ts +28 -0
- package/database-service/utils/DataModelHelper.js +1 -0
- package/database-service/utils/FieldType.d.ts +18 -0
- package/database-service/utils/FieldType.js +1 -0
- package/database-service/utils/SchemaUtils.d.ts +24 -0
- package/database-service/utils/SchemaUtils.js +1 -0
- package/database-service/utils/Utils.d.ts +134 -0
- package/database-service/utils/Utils.js +1 -0
- package/function-service/cloudFunction.d.ts +10 -0
- package/function-service/cloudFunction.js +1 -0
- package/function-service/exception/AGCFunctionException.d.ts +7 -0
- package/function-service/exception/AGCFunctionException.js +1 -0
- package/function-service/exception/FunctionErrorCode.d.ts +26 -0
- package/function-service/exception/FunctionErrorCode.js +1 -0
- package/function-service/index.d.ts +8 -0
- package/function-service/index.js +1 -0
- package/function-service/params/functionParams.d.ts +9 -0
- package/function-service/params/functionParams.js +1 -0
- package/function-service/params/index.d.ts +4 -0
- package/function-service/params/index.js +1 -0
- package/function-service/server/AGCFunction.d.ts +20 -0
- package/function-service/server/AGCFunction.js +1 -0
- package/function-service/server/FunctionCallable.d.ts +40 -0
- package/function-service/server/FunctionCallable.js +1 -0
- package/function-service/server/FunctionResult.d.ts +8 -0
- package/function-service/server/FunctionResult.js +1 -0
- package/function-service/server/request/RequestHeaders.d.ts +10 -0
- package/function-service/server/request/RequestHeaders.js +1 -0
- package/function-service/util/HashUtil.d.ts +10 -0
- package/function-service/util/HashUtil.js +1 -0
- package/index.d.ts +7 -0
- package/index.js +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HashUtil=void 0;var bignumber_js_1=__importDefault(require("bignumber.js")),MD5_HASH=require("spark-md5"),BIT_MAX=61,DIVISOR=62,BASE_62="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",HashUtil=function(){function e(){}return e.hash=function(r,t){var u="agc:"+r+"@"+t,i=MD5_HASH.hash(u);i="0x"+i;var a=new bignumber_js_1.default(i);return e.encode(a)},e.encode=function(e){for(var r="";e.isGreaterThan(BIT_MAX);){var t=e.modulo(DIVISOR);r=BASE_62.charAt(t.toNumber())+r,e=e.dividedToIntegerBy(DIVISOR)}return r=BASE_62.charAt(e.toNumber())+r},e}();exports.HashUtil=HashUtil;
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){void 0===i&&(i=t);var o=Object.getOwnPropertyDescriptor(r,t);o&&!("get"in o?!r.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,i,o)}:function(e,r,t,i){void 0===i&&(i=t),e[i]=r[t]}),__exportStar=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||Object.prototype.hasOwnProperty.call(r,t)||__createBinding(r,e,t)};Object.defineProperty(exports,"__esModule",{value:!0}),__exportStar(require("./cloud"),exports),__exportStar(require("./auth-service/"),exports),__exportStar(require("./function-service/"),exports),__exportStar(require("./database-service/"),exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hw-agconnect/cloud-server",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "AppGallery Connect Server-SDK for Node.js common module",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "AppGallery Connect",
|
|
7
|
+
"url": "https://developer.huawei.com/consumer/cn/service/josp/agc/index.html#/"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://developer.huawei.com/consumer/cn/service/josp/agc/index.html#/",
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=10.12.0"
|
|
12
|
+
},
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"main": "./index.js",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "gulp build",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"test-c": "jest --coverage",
|
|
19
|
+
"prettier-c": "prettier -c \"src/**/*.ts\"",
|
|
20
|
+
"prettier-w": "prettier -c \"src/**/*.ts\" --write --ignore-unknown",
|
|
21
|
+
"eslint": "eslint src --ext .ts",
|
|
22
|
+
"eslint-fix": "eslint src --ext .ts --fix"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/chai": "^4.2.12",
|
|
26
|
+
"@types/jest": "^26.0.10",
|
|
27
|
+
"@types/mocha": "^8.0.3",
|
|
28
|
+
"@types/node": "^16.3.0",
|
|
29
|
+
"@types/uuid": "^8.3.0",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "^4.0.1",
|
|
31
|
+
"@typescript-eslint/parser": "^4.0.1",
|
|
32
|
+
"chai": "^4.2.0",
|
|
33
|
+
"del": "^6.0.0",
|
|
34
|
+
"eslint": "^7.8.1",
|
|
35
|
+
"gulp": "^4.0.2",
|
|
36
|
+
"gulp-if": "^3.0.0",
|
|
37
|
+
"gulp-typescript": "^5.0.1",
|
|
38
|
+
"gulp-terser": "^2.1.0",
|
|
39
|
+
"jest": "^29.7.0",
|
|
40
|
+
"mocha": "^9.0.2",
|
|
41
|
+
"prettier": "^2.1.1",
|
|
42
|
+
"ts-jest": "^29.1.0",
|
|
43
|
+
"ts-node": "^10.0.0",
|
|
44
|
+
"axios-mock-adapter": "1.21.5",
|
|
45
|
+
"typescript": "^4.3.5"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"agconnect",
|
|
49
|
+
"Node.js",
|
|
50
|
+
"server SDK"
|
|
51
|
+
],
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"axios": "1.6.8",
|
|
54
|
+
"uuid": "^8.3.2",
|
|
55
|
+
"bignumber.js": "9.1.2",
|
|
56
|
+
"spark-md5": "3.0.2"
|
|
57
|
+
}
|
|
58
|
+
}
|