@ductape/sdk 0.1.108 → 0.1.113
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/processorApi.service.js +23 -9
- package/dist/api/services/processorApi.service.js.map +1 -1
- package/dist/features/feature-executor.d.ts +9 -0
- package/dist/features/feature-executor.js +246 -74
- package/dist/features/feature-executor.js.map +1 -1
- package/dist/features/features.service.d.ts +5 -0
- package/dist/features/features.service.js +49 -7
- package/dist/features/features.service.js.map +1 -1
- package/dist/features/index.d.ts +2 -1
- package/dist/features/index.js +3 -1
- package/dist/features/index.js.map +1 -1
- package/dist/features/types/features.types.d.ts +9 -0
- package/dist/features/types/features.types.js.map +1 -1
- package/dist/functions/functions.runtime.d.ts +25 -0
- package/dist/functions/functions.runtime.js +254 -0
- package/dist/functions/functions.runtime.js.map +1 -0
- package/dist/functions/http-handler.d.ts +17 -0
- package/dist/functions/http-handler.js +51 -0
- package/dist/functions/http-handler.js.map +1 -0
- package/dist/functions/index.d.ts +3 -0
- package/dist/functions/index.js +20 -0
- package/dist/functions/index.js.map +1 -0
- package/dist/functions/types.d.ts +94 -0
- package/dist/functions/types.js +15 -0
- package/dist/functions/types.js.map +1 -0
- package/dist/graph/graphs.service.d.ts +1 -1
- package/dist/graph/graphs.service.js +73 -43
- package/dist/graph/graphs.service.js.map +1 -1
- package/dist/graph/types/traversal.interface.d.ts +2 -0
- package/dist/index.d.ts +16 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/processor/services/processor.service.d.ts +6 -0
- package/dist/processor/services/processor.service.js +8 -13
- package/dist/processor/services/processor.service.js.map +1 -1
- package/dist/sessions/sessions.service.d.ts +2 -0
- package/dist/sessions/sessions.service.js +15 -5
- package/dist/sessions/sessions.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/productsBuilder.types.d.ts +3 -0
- package/dist/types/productsBuilder.types.js +2 -0
- package/dist/types/productsBuilder.types.js.map +1 -1
- package/dist/vector/vector-database.service.d.ts +2 -0
- package/dist/vector/vector-database.service.js +21 -12
- package/dist/vector/vector-database.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -46,6 +46,7 @@ export default class ProcessorService implements IProcessorService {
|
|
|
46
46
|
private queues;
|
|
47
47
|
private _privateKey;
|
|
48
48
|
private accessKey;
|
|
49
|
+
private featureExecutionContext?;
|
|
49
50
|
private cacheService;
|
|
50
51
|
/** When a notification fails, which channel (push/email/sms/callbacks) we were in, for failure log type */
|
|
51
52
|
private lastNotificationFailureType?;
|
|
@@ -71,6 +72,11 @@ export default class ProcessorService implements IProcessorService {
|
|
|
71
72
|
private_key: string;
|
|
72
73
|
preInitializedProductBuilder?: IProductsBuilderService;
|
|
73
74
|
});
|
|
75
|
+
/** Correlate nested action/broker/notification records with their parent feature run. */
|
|
76
|
+
setFeatureExecutionContext(context: {
|
|
77
|
+
feature_id: string;
|
|
78
|
+
feature_tag: string;
|
|
79
|
+
}): void;
|
|
74
80
|
/**
|
|
75
81
|
* Pool key for broker service reuse (same broker type + config => same connection).
|
|
76
82
|
*/
|
|
@@ -203,6 +203,10 @@ class ProcessorService {
|
|
|
203
203
|
this.queues = queues;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
+
/** Correlate nested action/broker/notification records with their parent feature run. */
|
|
207
|
+
setFeatureExecutionContext(context) {
|
|
208
|
+
this.featureExecutionContext = context;
|
|
209
|
+
}
|
|
206
210
|
/**
|
|
207
211
|
* Pool key for broker service reuse (same broker type + config => same connection).
|
|
208
212
|
*/
|
|
@@ -4558,20 +4562,11 @@ class ProcessorService {
|
|
|
4558
4562
|
}
|
|
4559
4563
|
}
|
|
4560
4564
|
async writeResult(status, retryable = true) {
|
|
4561
|
-
var _a, _b, _c, _d, _e, _f;
|
|
4565
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4562
4566
|
const envSlug = (_f = (_d = (_b = (_a = this.processEnv) === null || _a === void 0 ? void 0 : _a.slug) !== null && _b !== void 0 ? _b : (_c = this.input) === null || _c === void 0 ? void 0 : _c.env) !== null && _d !== void 0 ? _d : (_e = this.baseLogs) === null || _e === void 0 ? void 0 : _e.env) !== null && _f !== void 0 ? _f : '';
|
|
4563
|
-
this.processorApiService.saveResult({
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
start: this.start,
|
|
4567
|
-
end: this.end,
|
|
4568
|
-
retryable,
|
|
4569
|
-
result: (0, processor_utils_1.encrypt)(JSON.stringify(this.processingOutput), this.productBuilderService.fetchPrivateKey()),
|
|
4570
|
-
process_id: this.process_id,
|
|
4571
|
-
product_id: this.productId,
|
|
4572
|
-
env: envSlug,
|
|
4573
|
-
input: (0, processor_utils_1.encrypt)(JSON.stringify(this.input), this.productBuilderService.fetchPrivateKey()),
|
|
4574
|
-
}, this.getUserAccess());
|
|
4567
|
+
await this.processorApiService.saveResult(Object.assign(Object.assign({ status, component: this.component, start: this.start, end: this.end, retryable, result: (0, processor_utils_1.encrypt)(JSON.stringify(this.processingOutput), this.productBuilderService.fetchPrivateKey()), process_id: this.process_id, product_id: this.productId, product_tag: this.productTag ||
|
|
4568
|
+
((_g = this.input) === null || _g === void 0 ? void 0 : _g.product) ||
|
|
4569
|
+
((_h = this.baseLogs) === null || _h === void 0 ? void 0 : _h.product_tag), workspace_id: this.workspace_id }, ((_j = this.featureExecutionContext) !== null && _j !== void 0 ? _j : {})), { env: envSlug, input: (0, processor_utils_1.encrypt)(JSON.stringify(this.input), this.productBuilderService.fetchPrivateKey()) }), Object.assign(Object.assign({}, this.getUserAccess()), { access_key: this.accessKey }));
|
|
4575
4570
|
}
|
|
4576
4571
|
/**
|
|
4577
4572
|
* Separate credentials into prefixed (e.g., 'headers:Authorization') and non-prefixed (e.g., 'api_key').
|