@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.
- package/LICENSE +201 -201
- package/README.md +17 -0
- package/dist/__tests__/common-test.utils.d.ts +2 -0
- package/dist/__tests__/common-test.utils.js +9 -0
- package/dist/__tests__/mongo-db.test-database.js +1 -1
- package/dist/__tests__/postgres.test-database.js +0 -1
- package/dist/controllers/organizations.controller.d.ts +1 -0
- package/dist/controllers/organizations.controller.js +9 -0
- package/dist/databases/models/classified-filter-key.d.ts +8 -0
- package/dist/databases/models/classified-filter-key.js +1 -0
- package/dist/databases/models/index.d.ts +2 -0
- package/dist/databases/models/index.js +2 -0
- package/dist/databases/models/join-filter.interface.d.ts +8 -0
- package/dist/databases/models/join-filter.interface.js +1 -0
- package/dist/databases/mongo-db/queries/mongo-get-by-id.query.js +11 -4
- package/dist/databases/mongo-db/queries/mongo-get.query.js +11 -3
- package/dist/databases/mongo-db/utils/build-join-match.util.d.ts +4 -0
- package/dist/databases/mongo-db/utils/build-join-match.util.js +192 -0
- package/dist/databases/mongo-db/utils/convert-operations-to-pipeline.util.js +15 -5
- package/dist/databases/operations/index.d.ts +1 -0
- package/dist/databases/operations/index.js +1 -0
- package/dist/databases/operations/join-operation.d.ts +4 -0
- package/dist/databases/operations/join-operation.js +1 -0
- package/dist/databases/postgres/commands/postgres-batch-update.command.js +2 -3
- package/dist/databases/postgres/commands/postgres-delete-many.command.js +1 -1
- package/dist/databases/postgres/commands/postgres-full-update-by-id.command.js +1 -3
- package/dist/databases/postgres/commands/postgres-partial-update-by-id.command.js +1 -3
- package/dist/databases/postgres/commands/postgres-update.command.js +4 -7
- package/dist/databases/postgres/queries/postgres-find-one.query.js +2 -2
- package/dist/databases/postgres/queries/postgres-find.query.js +2 -2
- package/dist/databases/postgres/queries/postgres-get-all.query.js +1 -3
- package/dist/databases/postgres/queries/postgres-get-by-id.query.js +2 -5
- package/dist/databases/postgres/queries/postgres-get.query.js +6 -11
- package/dist/databases/postgres/utils/build-count-query.d.ts +6 -1
- package/dist/databases/postgres/utils/build-count-query.js +11 -3
- package/dist/databases/postgres/utils/build-join-clauses.d.ts +2 -4
- package/dist/databases/postgres/utils/build-join-clauses.js +28 -35
- package/dist/databases/postgres/utils/build-join-where.d.ts +9 -0
- package/dist/databases/postgres/utils/build-join-where.js +136 -0
- package/dist/databases/postgres/utils/build-order-by-clause.d.ts +1 -4
- package/dist/databases/postgres/utils/build-order-by-clause.js +2 -3
- package/dist/databases/postgres/utils/build-select-clause.js +2 -4
- package/dist/databases/postgres/utils/build-where-clause.d.ts +2 -1
- package/dist/databases/postgres/utils/build-where-clause.js +18 -70
- package/dist/databases/utils/is-join-operation.util.d.ts +3 -0
- package/dist/databases/utils/is-join-operation.util.js +6 -0
- package/dist/databases/utils/resolve-join-filter.d.ts +13 -0
- package/dist/databases/utils/resolve-join-filter.js +75 -0
- package/dist/services/organization.service.d.ts +17 -1
- package/dist/services/organization.service.js +205 -3
- package/dist/utils/password.utils.d.ts +2 -0
- package/dist/utils/password.utils.js +4 -0
- package/dist/utils/string.utils.d.ts +2 -0
- package/dist/utils/string.utils.js +5 -1
- 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
|
};
|