@form-engine-ts/storage-azure-table 7.18.1 → 8.0.0

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/index.cjs CHANGED
@@ -538,6 +538,18 @@ function createAzureTableStorage(options = {}) {
538
538
  ...formVersion === void 0 ? {} : { version: formVersion }
539
539
  });
540
540
  },
541
+ async countSubmissions(formId, formVersion, options2 = {}) {
542
+ let count = 0;
543
+ const query = { ...options2, ...formVersion === void 0 ? {} : { version: formVersion } };
544
+ const client = await submissionClient(formId, query);
545
+ for await (const raw of client.listEntities({
546
+ queryOptions: { filter: queryFilter(formId, query) }
547
+ })) {
548
+ const submission = deserializeIfMatching(raw);
549
+ if (submission !== void 0 && matchesBuiltInFilters(submission, formId, query)) count += 1;
550
+ }
551
+ return count;
552
+ },
541
553
  async listSubmissionPage(formId, query = {}) {
542
554
  const pageSize = (0, import_core.normalizeSubmissionPageSize)(query.pageSize);
543
555
  const client = await submissionClient(formId, query);
package/dist/index.js CHANGED
@@ -520,6 +520,18 @@ function createAzureTableStorage(options = {}) {
520
520
  ...formVersion === void 0 ? {} : { version: formVersion }
521
521
  });
522
522
  },
523
+ async countSubmissions(formId, formVersion, options2 = {}) {
524
+ let count = 0;
525
+ const query = { ...options2, ...formVersion === void 0 ? {} : { version: formVersion } };
526
+ const client = await submissionClient(formId, query);
527
+ for await (const raw of client.listEntities({
528
+ queryOptions: { filter: queryFilter(formId, query) }
529
+ })) {
530
+ const submission = deserializeIfMatching(raw);
531
+ if (submission !== void 0 && matchesBuiltInFilters(submission, formId, query)) count += 1;
532
+ }
533
+ return count;
534
+ },
523
535
  async listSubmissionPage(formId, query = {}) {
524
536
  const pageSize = normalizeSubmissionPageSize(query.pageSize);
525
537
  const client = await submissionClient(formId, query);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@form-engine-ts/storage-azure-table",
3
- "version": "7.18.1",
3
+ "version": "8.0.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,7 +39,7 @@
39
39
  "typescript"
40
40
  ],
41
41
  "dependencies": {
42
- "@form-engine-ts/core": "7.18.1"
42
+ "@form-engine-ts/core": "8.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@azure/data-tables": "^13.3.2"
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@azure/data-tables": "^13.3.2",
54
- "@form-engine-ts/storage": "7.18.1"
54
+ "@form-engine-ts/storage": "8.0.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsup src/index.ts --format esm,cjs --dts --clean --external @form-engine-ts/core",