@adminforth/bulk-ai-flow 1.27.1 → 1.27.2

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/build.log CHANGED
@@ -14,5 +14,5 @@ custom/package.json
14
14
  custom/pnpm-lock.yaml
15
15
  custom/tsconfig.json
16
16
 
17
- sent 130,464 bytes received 191 bytes 261,310.00 bytes/sec
17
+ sent 130,454 bytes received 191 bytes 261,290.00 bytes/sec
18
18
  total size is 129,741 speedup is 0.99
package/dist/index.js CHANGED
@@ -811,28 +811,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
811
811
  return `${this.pluginOptions.actionName}`;
812
812
  }
813
813
  setupEndpoints(server) {
814
- server.endpoint({
815
- method: 'POST',
816
- path: `/plugin/${this.pluginInstanceId}/get_records`,
817
- request_schema: getRecordsBodySchema,
818
- handler: (_a) => __awaiter(this, [_a], void 0, function* ({ body, response }) {
819
- const data = body;
820
- if (!Array.isArray(data.record)) {
821
- return { records: [] };
822
- }
823
- let records = [];
824
- const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
825
- records = yield this.adminforth.resource(this.resourceConfig.resourceId).list([Filters.IN(primaryKeyColumn.name, data.record)]);
826
- for (const [index, record] of records.entries()) {
827
- records[index]._label = this.resourceConfig.recordLabel(records[index]);
828
- }
829
- const order = Object.fromEntries(data.record.map((id, i) => [id, i]));
830
- const sortedRecords = records.sort((a, b) => order[a.id] - order[b.id]);
831
- return {
832
- records: sortedRecords,
833
- };
834
- })
835
- });
836
814
  server.endpoint({
837
815
  method: 'POST',
838
816
  path: `/plugin/${this.pluginInstanceId}/get_old_data`,
package/index.ts CHANGED
@@ -829,33 +829,6 @@ export default class BulkAiFlowPlugin extends AdminForthPlugin {
829
829
  }
830
830
 
831
831
  setupEndpoints(server: IHttpServer) {
832
- server.endpoint({
833
- method: 'POST',
834
- path: `/plugin/${this.pluginInstanceId}/get_records`,
835
- request_schema: getRecordsBodySchema,
836
- handler: async ({ body, response }) => {
837
- const data = body as z.infer<typeof getRecordsBodySchema>;
838
- if (!Array.isArray(data.record)) {
839
- return { records: [] };
840
- }
841
- let records = [];
842
- const primaryKeyColumn = this.resourceConfig.columns.find((col) => col.primaryKey);
843
- records = await this.adminforth.resource(this.resourceConfig.resourceId).list([Filters.IN(primaryKeyColumn.name, data.record)]);
844
- for( const [index, record] of records.entries() ) {
845
- records[index]._label = this.resourceConfig.recordLabel(records[index]);
846
- }
847
- const order = Object.fromEntries(data.record.map((id, i) => [id, i]));
848
-
849
- const sortedRecords = records.sort(
850
- (a, b) => order[a.id] - order[b.id]
851
- );
852
- return {
853
- records: sortedRecords,
854
- };
855
- }
856
- });
857
-
858
-
859
832
  server.endpoint({
860
833
  method: 'POST',
861
834
  path: `/plugin/${this.pluginInstanceId}/get_old_data`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/bulk-ai-flow",
3
- "version": "1.27.1",
3
+ "version": "1.27.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },