@loomcore/api 0.2.69 → 0.2.71

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.
Files changed (55) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +17 -0
  3. package/dist/__tests__/common-test.utils.d.ts +2 -0
  4. package/dist/__tests__/common-test.utils.js +9 -0
  5. package/dist/__tests__/mongo-db.test-database.js +1 -1
  6. package/dist/__tests__/postgres.test-database.js +0 -1
  7. package/dist/controllers/organizations.controller.d.ts +1 -0
  8. package/dist/controllers/organizations.controller.js +9 -0
  9. package/dist/databases/models/classified-filter-key.d.ts +8 -0
  10. package/dist/databases/models/classified-filter-key.js +1 -0
  11. package/dist/databases/models/index.d.ts +2 -0
  12. package/dist/databases/models/index.js +2 -0
  13. package/dist/databases/models/join-filter.interface.d.ts +8 -0
  14. package/dist/databases/models/join-filter.interface.js +1 -0
  15. package/dist/databases/mongo-db/queries/mongo-get-by-id.query.js +11 -4
  16. package/dist/databases/mongo-db/queries/mongo-get.query.js +11 -3
  17. package/dist/databases/mongo-db/utils/build-join-match.util.d.ts +4 -0
  18. package/dist/databases/mongo-db/utils/build-join-match.util.js +192 -0
  19. package/dist/databases/mongo-db/utils/convert-operations-to-pipeline.util.js +15 -5
  20. package/dist/databases/operations/index.d.ts +1 -0
  21. package/dist/databases/operations/index.js +1 -0
  22. package/dist/databases/operations/join-operation.d.ts +4 -0
  23. package/dist/databases/operations/join-operation.js +1 -0
  24. package/dist/databases/postgres/commands/postgres-batch-update.command.js +2 -3
  25. package/dist/databases/postgres/commands/postgres-delete-many.command.js +1 -1
  26. package/dist/databases/postgres/commands/postgres-full-update-by-id.command.js +1 -3
  27. package/dist/databases/postgres/commands/postgres-partial-update-by-id.command.js +1 -3
  28. package/dist/databases/postgres/commands/postgres-update.command.js +4 -7
  29. package/dist/databases/postgres/queries/postgres-find-one.query.js +2 -2
  30. package/dist/databases/postgres/queries/postgres-find.query.js +2 -2
  31. package/dist/databases/postgres/queries/postgres-get-all.query.js +1 -3
  32. package/dist/databases/postgres/queries/postgres-get-by-id.query.js +2 -5
  33. package/dist/databases/postgres/queries/postgres-get.query.js +6 -11
  34. package/dist/databases/postgres/utils/build-count-query.d.ts +6 -1
  35. package/dist/databases/postgres/utils/build-count-query.js +11 -3
  36. package/dist/databases/postgres/utils/build-join-clauses.d.ts +2 -4
  37. package/dist/databases/postgres/utils/build-join-clauses.js +28 -35
  38. package/dist/databases/postgres/utils/build-join-where.d.ts +9 -0
  39. package/dist/databases/postgres/utils/build-join-where.js +136 -0
  40. package/dist/databases/postgres/utils/build-order-by-clause.d.ts +1 -4
  41. package/dist/databases/postgres/utils/build-order-by-clause.js +2 -3
  42. package/dist/databases/postgres/utils/build-select-clause.js +2 -4
  43. package/dist/databases/postgres/utils/build-where-clause.d.ts +2 -1
  44. package/dist/databases/postgres/utils/build-where-clause.js +18 -70
  45. package/dist/databases/utils/is-join-operation.util.d.ts +3 -0
  46. package/dist/databases/utils/is-join-operation.util.js +6 -0
  47. package/dist/databases/utils/resolve-join-filter.d.ts +13 -0
  48. package/dist/databases/utils/resolve-join-filter.js +75 -0
  49. package/dist/services/organization.service.d.ts +17 -1
  50. package/dist/services/organization.service.js +205 -3
  51. package/dist/utils/password.utils.d.ts +2 -0
  52. package/dist/utils/password.utils.js +4 -0
  53. package/dist/utils/string.utils.d.ts +2 -0
  54. package/dist/utils/string.utils.js +5 -1
  55. package/package.json +1 -1
@@ -1,9 +1,11 @@
1
1
  declare function camelCase(str: string): string;
2
2
  declare function pascalCase(str: string): string;
3
3
  declare function kebabCase(str: string): string;
4
+ declare function isValidDnsLabel(value: string): boolean;
4
5
  export declare const stringUtils: {
5
6
  camelCase: typeof camelCase;
6
7
  pascalCase: typeof pascalCase;
7
8
  kebabCase: typeof kebabCase;
9
+ isValidDnsLabel: typeof isValidDnsLabel;
8
10
  };
9
11
  export {};
@@ -23,8 +23,12 @@ function kebabCase(str) {
23
23
  .replace(/^-|-$/g, '');
24
24
  return result;
25
25
  }
26
+ function isValidDnsLabel(value) {
27
+ return /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/.test(value);
28
+ }
26
29
  export const stringUtils = {
27
30
  camelCase,
28
31
  pascalCase,
29
- kebabCase
32
+ kebabCase,
33
+ isValidDnsLabel,
30
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomcore/api",
3
- "version": "0.2.69",
3
+ "version": "0.2.71",
4
4
  "private": false,
5
5
  "description": "Loom Core Api - An opinionated Node.js api using Typescript, Express, and MongoDb or PostgreSQL",
6
6
  "scripts": {