@ductape/sdk 0.0.3-beta13 → 0.0.3-beta15
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/api/services/webhooksApi.service.d.ts +4 -1
- package/dist/api/services/webhooksApi.service.js +6 -3
- package/dist/api/services/webhooksApi.service.js.map +1 -1
- package/dist/clients/webhooks.client.d.ts +2 -1
- package/dist/clients/webhooks.client.js +2 -2
- package/dist/clients/webhooks.client.js.map +1 -1
- package/dist/imports/imports.service.d.ts +2 -3
- package/dist/imports/imports.service.js +4 -45
- package/dist/imports/imports.service.js.map +1 -1
- package/dist/imports/imports.types.d.ts +238 -0
- package/dist/imports/repos/openApi.repo.d.ts +5 -11
- package/dist/imports/repos/openApi.repo.js +77 -27
- package/dist/imports/repos/openApi.repo.js.map +1 -1
- package/dist/processor/utils/processor.utils.d.ts +2 -1
- package/dist/products/services/products.service.d.ts +1 -0
- package/dist/products/services/products.service.js +4 -0
- package/dist/products/services/products.service.js.map +1 -1
- package/dist/test/test.import.openapi.d.ts +1 -0
- package/dist/test/test.import.openapi.js +76 -0
- package/dist/test/test.import.openapi.js.map +1 -0
- package/dist/types/processor.types.d.ts +1 -0
- package/package.json +5 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const __1 = __importDefault(require(".."));
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const app_service_1 = __importDefault(require("../apps/services/app.service"));
|
|
43
|
+
const openApi_repo_1 = require("../imports/repos/openApi.repo");
|
|
44
|
+
const types_1 = require("../types");
|
|
45
|
+
const user_id = '67a9feee7d528a34748d7d79';
|
|
46
|
+
const workspace_id = '67ae011bf44ac32165e888ac';
|
|
47
|
+
const private_key = '81c08ee3-ed8e-4650-a11e-a3483d345251';
|
|
48
|
+
const ductape = new __1.default({ user_id, workspace_id, private_key });
|
|
49
|
+
const filePath = path.resolve(__dirname, '../openapi.json');
|
|
50
|
+
const openapiRaw = fs.readFileSync(filePath, 'utf-8');
|
|
51
|
+
const openAPIJSON = JSON.parse(openapiRaw);
|
|
52
|
+
// console.log('OpenAPI JSON details:', openAPIJSON);
|
|
53
|
+
const runTest = async () => {
|
|
54
|
+
console.log(JSON.stringify(await openApi_repo_1.OpenAPIV3Repo.fetchParsedItems(openAPIJSON, new app_service_1.default({
|
|
55
|
+
workspace_id: '',
|
|
56
|
+
public_key: '',
|
|
57
|
+
user_id: '',
|
|
58
|
+
token: '',
|
|
59
|
+
env_type: types_1.EnvType.PRODUCTION,
|
|
60
|
+
}))));
|
|
61
|
+
};
|
|
62
|
+
runTest();
|
|
63
|
+
// const run = async () => {
|
|
64
|
+
// console.log('Starting the import process...');
|
|
65
|
+
// try {
|
|
66
|
+
// // Read the Postman file as a Buffer
|
|
67
|
+
// const postmanBuffer = fs.readFileSync(filePath);
|
|
68
|
+
// // Import the Postman collection
|
|
69
|
+
// await ductape.app.actions.import({ file: postmanBuffer, type: ImportDocsTypes.postmanV21, version: '0.0.1' }); //(postmanBuffer, ImportDocsTypes.postmanV21, true, null);
|
|
70
|
+
// console.log('Postman collection imported successfully!');
|
|
71
|
+
// } catch (error) {
|
|
72
|
+
// console.error('Error during import:', error);
|
|
73
|
+
// }
|
|
74
|
+
// };
|
|
75
|
+
// run();
|
|
76
|
+
//# sourceMappingURL=test.import.openapi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.import.openapi.js","sourceRoot":"","sources":["../../src/test/test.import.openapi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,uCAAyB;AAEzB,2CAA6B;AAC7B,+EAA6D;AAC7D,gEAA8D;AAC9D,oCAAmC;AAEnC,MAAM,OAAO,GAAG,0BAA0B,CAAC;AAC3C,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,WAAW,GAAG,sCAAsC,CAAC;AAC3D,MAAM,OAAO,GAAG,IAAI,WAAO,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;AAEpE,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;AAC5D,MAAM,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACtD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAE3C,qDAAqD;AAErD,MAAM,OAAO,GAAG,KAAK,IAAI,EAAE;IAC3B,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CACZ,MAAM,4BAAa,CAAC,gBAAgB,CAClC,WAAW,EACX,IAAI,qBAAiB,CAAC;QACpB,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,eAAO,CAAC,UAAU;KAC7B,CAAC,CACH,CACF,CACF,CAAC;AACF,CAAC,CAAA;AAED,OAAO,EAAE,CAAC;AAEV,4BAA4B;AAC5B,mDAAmD;AAEnD,UAAU;AACV,2CAA2C;AAC3C,uDAAuD;AACvD,uCAAuC;AACvC,gLAAgL;AAEhL,gEAAgE;AAChE,sBAAsB;AACtB,oDAAoD;AACpD,MAAM;AACN,KAAK;AAEL,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ductape/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3beta15",
|
|
4
4
|
"description": "sdk for building ductaped products",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"kafkajs": "^2.2.4",
|
|
45
45
|
"mongodb": "^6.14.2",
|
|
46
46
|
"nodemailer": "^6.10.0",
|
|
47
|
+
"openapi-to-postmanv2": "^5.0.0",
|
|
47
48
|
"pg": "^8.13.3",
|
|
48
49
|
"redis": "^4.7.0",
|
|
49
50
|
"sql-parser": "^0.5.0",
|
|
@@ -55,11 +56,13 @@
|
|
|
55
56
|
"@types/aws-sdk": "^0.0.42",
|
|
56
57
|
"@types/crypto-js": "^4.2.2",
|
|
57
58
|
"@types/mime-types": "^2.1.4",
|
|
59
|
+
"@types/node": "^22.15.19",
|
|
58
60
|
"@types/nodemailer": "^6.4.17",
|
|
61
|
+
"@types/openapi-to-postmanv2": "^3.2.4",
|
|
59
62
|
"@types/pg": "^8.11.11",
|
|
60
63
|
"@types/uuid": "^10.0.0",
|
|
61
64
|
"@types/xml2js": "^0.4.11",
|
|
62
65
|
"@types/xml2json": "^0.11.4",
|
|
63
|
-
"typescript": "^5.
|
|
66
|
+
"typescript": "^5.8.3"
|
|
64
67
|
}
|
|
65
68
|
}
|