@liminalfunctions/framework 1.0.12 → 1.0.14

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 (118) hide show
  1. package/dist/code_generation/generate_client_library.js +4 -4
  2. package/dist/code_generation/generate_client_library.js.map +1 -1
  3. package/dist/code_generation/utils/type_from_zod.d.ts +3 -1
  4. package/dist/code_generation/utils/type_from_zod.js +53 -20
  5. package/dist/code_generation/utils/type_from_zod.js.map +1 -1
  6. package/dist/utils/mongoose_from_zod.d.ts +2 -1
  7. package/dist/utils/mongoose_from_zod.js +4 -3
  8. package/dist/utils/mongoose_from_zod.js.map +1 -1
  9. package/dist/utils/query_validator_from_zod.js +7 -3
  10. package/dist/utils/query_validator_from_zod.js.map +1 -1
  11. package/dist/utils/zod_loop_seperator.d.ts +12 -0
  12. package/dist/utils/zod_loop_seperator.js +67 -0
  13. package/dist/utils/zod_loop_seperator.js.map +1 -0
  14. package/package.json +1 -1
  15. package/src/code_generation/generate_client_library.ts +4 -4
  16. package/src/code_generation/utils/type_from_zod.ts +63 -22
  17. package/src/utils/mongoose_from_zod.ts +11 -9
  18. package/src/utils/query_validator_from_zod.ts +9 -6
  19. package/src/utils/zod_loop_seperator.ts +91 -0
  20. package/test/0_0_loop_detect.test.ts +117 -0
  21. package/test/{0_0_mongoose_from_zod.test.ts → 0_1_mongoose_from_zod.test.ts} +8 -7
  22. package/test/{0_1_query_validator_from_zod.test.ts → 0_2_query_validator_from_zod.test.ts} +1 -10
  23. package/test/1_2_role_membership.test.ts +1 -1
  24. package/test/2_0_client_library_basic_type_generation.test.ts +75 -0
  25. package/test/tmp/dist/Brief_News_Category.d.ts +16 -0
  26. package/test/tmp/dist/Brief_News_Category.js +85 -0
  27. package/test/tmp/dist/Brief_News_Category.js.map +1 -0
  28. package/test/tmp/dist/Client.d.ts +19 -0
  29. package/test/tmp/dist/Client.js +97 -0
  30. package/test/tmp/dist/Client.js.map +1 -0
  31. package/test/tmp/dist/Institution.d.ts +18 -0
  32. package/test/tmp/dist/Institution.js +94 -0
  33. package/test/tmp/dist/Institution.js.map +1 -0
  34. package/test/tmp/dist/Project.d.ts +16 -0
  35. package/test/tmp/dist/Project.js +85 -0
  36. package/test/tmp/dist/Project.js.map +1 -0
  37. package/test/tmp/dist/index.d.ts +4 -0
  38. package/test/tmp/dist/index.js +14 -0
  39. package/test/tmp/dist/index.js.map +1 -0
  40. package/test/tmp/dist/types/brief_news_category.d.ts +7 -0
  41. package/test/tmp/dist/types/brief_news_category.js +2 -0
  42. package/test/tmp/dist/types/brief_news_category.js.map +1 -0
  43. package/test/tmp/dist/types/brief_news_category_post.d.ts +7 -0
  44. package/test/tmp/dist/types/brief_news_category_post.js +2 -0
  45. package/test/tmp/dist/types/brief_news_category_post.js.map +1 -0
  46. package/test/tmp/dist/types/brief_news_category_put.d.ts +7 -0
  47. package/test/tmp/dist/types/brief_news_category_put.js +2 -0
  48. package/test/tmp/dist/types/brief_news_category_put.js.map +1 -0
  49. package/test/tmp/dist/types/brief_news_category_query.d.ts +26 -0
  50. package/test/tmp/dist/types/brief_news_category_query.js +2 -0
  51. package/test/tmp/dist/types/brief_news_category_query.js.map +1 -0
  52. package/test/tmp/dist/types/client.d.ts +5 -0
  53. package/test/tmp/dist/types/client.js +2 -0
  54. package/test/tmp/dist/types/client.js.map +1 -0
  55. package/test/tmp/dist/types/client_post.d.ts +5 -0
  56. package/test/tmp/dist/types/client_post.js +2 -0
  57. package/test/tmp/dist/types/client_post.js.map +1 -0
  58. package/test/tmp/dist/types/client_put.d.ts +5 -0
  59. package/test/tmp/dist/types/client_put.js +2 -0
  60. package/test/tmp/dist/types/client_put.js.map +1 -0
  61. package/test/tmp/dist/types/client_query.d.ts +18 -0
  62. package/test/tmp/dist/types/client_query.js +2 -0
  63. package/test/tmp/dist/types/client_query.js.map +1 -0
  64. package/test/tmp/dist/types/institution.d.ts +4 -0
  65. package/test/tmp/dist/types/institution.js +2 -0
  66. package/test/tmp/dist/types/institution.js.map +1 -0
  67. package/test/tmp/dist/types/institution_post.d.ts +4 -0
  68. package/test/tmp/dist/types/institution_post.js +2 -0
  69. package/test/tmp/dist/types/institution_post.js.map +1 -0
  70. package/test/tmp/dist/types/institution_put.d.ts +4 -0
  71. package/test/tmp/dist/types/institution_put.js +2 -0
  72. package/test/tmp/dist/types/institution_put.js.map +1 -0
  73. package/test/tmp/dist/types/institution_query.d.ts +14 -0
  74. package/test/tmp/dist/types/institution_query.js +2 -0
  75. package/test/tmp/dist/types/institution_query.js.map +1 -0
  76. package/test/tmp/dist/types/project.d.ts +7 -0
  77. package/test/tmp/dist/types/project.js +2 -0
  78. package/test/tmp/dist/types/project.js.map +1 -0
  79. package/test/tmp/dist/types/project_post.d.ts +7 -0
  80. package/test/tmp/dist/types/project_post.js +2 -0
  81. package/test/tmp/dist/types/project_post.js.map +1 -0
  82. package/test/tmp/dist/types/project_put.d.ts +7 -0
  83. package/test/tmp/dist/types/project_put.js +2 -0
  84. package/test/tmp/dist/types/project_put.js.map +1 -0
  85. package/test/tmp/dist/types/project_query.d.ts +27 -0
  86. package/test/tmp/dist/types/project_query.js +2 -0
  87. package/test/tmp/dist/types/project_query.js.map +1 -0
  88. package/test/tmp/dist/utils/utils.d.ts +11 -0
  89. package/test/tmp/dist/utils/utils.js +13 -0
  90. package/test/tmp/dist/utils/utils.js.map +1 -0
  91. package/test/tmp/package-lock.json +573 -0
  92. package/test/tmp/src/Brief_News_Category.ts +94 -0
  93. package/test/tmp/src/Client.ts +106 -0
  94. package/test/tmp/src/Institution.ts +103 -0
  95. package/test/tmp/src/Project.ts +94 -0
  96. package/test/tmp/src/index.ts +4 -1
  97. package/test/tmp/src/types/brief_news_category.ts +7 -0
  98. package/test/tmp/src/types/brief_news_category_post.ts +7 -0
  99. package/test/tmp/src/types/brief_news_category_put.ts +7 -0
  100. package/test/tmp/src/types/brief_news_category_query.ts +26 -0
  101. package/test/tmp/src/types/client.ts +5 -0
  102. package/test/tmp/src/types/client_post.ts +5 -0
  103. package/test/tmp/src/types/client_put.ts +5 -0
  104. package/test/tmp/src/types/client_query.ts +18 -0
  105. package/test/tmp/src/types/institution.ts +4 -0
  106. package/test/tmp/src/types/institution_post.ts +4 -0
  107. package/test/tmp/src/types/institution_put.ts +4 -0
  108. package/test/tmp/src/types/institution_query.ts +14 -0
  109. package/test/tmp/src/types/project.ts +7 -0
  110. package/test/tmp/src/types/project_post.ts +7 -0
  111. package/test/tmp/src/types/project_put.ts +7 -0
  112. package/test/tmp/src/types/project_query.ts +27 -0
  113. package/test/tmp/src/types/test_collection.ts +0 -3
  114. package/test/tmp/src/types/test_collection_post.ts +0 -3
  115. package/test/tmp/src/types/test_collection_put.ts +0 -3
  116. package/test/tmp/src/types/test_collection_query.ts +0 -6
  117. /package/test/{0_2_query_validator_to_mongodb_query.test.ts → 0_3_query_validator_to_mongodb_query.test.ts} +0 -0
  118. /package/test/{0_3_cache.test.ts → 0_4_cache.test.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=institution_post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"institution_post.js","sourceRoot":"","sources":["../../src/types/institution_post.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type institution_put = {
2
+ "_id"?: string;
3
+ "name"?: string;
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=institution_put.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"institution_put.js","sourceRoot":"","sources":["../../src/types/institution_put.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export type institution_query = {
2
+ "limit"?: number;
3
+ "cursor"?: string;
4
+ "sort_order"?: ("ascending" | "descending");
5
+ "_id"?: string;
6
+ "_id_gt"?: string;
7
+ "_id_lt"?: string;
8
+ "_id_in"?: string[];
9
+ "name"?: string;
10
+ "name_gt"?: string;
11
+ "name_lt"?: string;
12
+ "name_in"?: string[];
13
+ "sort"?: ("_id" | "name");
14
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=institution_query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"institution_query.js","sourceRoot":"","sources":["../../src/types/institution_query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type project = {
2
+ "_id": string;
3
+ "name": string;
4
+ "institution_id": string;
5
+ "client_id": string;
6
+ "project_number": number;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/types/project.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type project_post = {
2
+ "_id"?: string;
3
+ "name": string;
4
+ "institution_id": string;
5
+ "client_id": string;
6
+ "project_number": number;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project_post.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project_post.js","sourceRoot":"","sources":["../../src/types/project_post.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type project_put = {
2
+ "_id"?: string;
3
+ "name"?: string;
4
+ "institution_id"?: string;
5
+ "client_id"?: string;
6
+ "project_number"?: number;
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project_put.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project_put.js","sourceRoot":"","sources":["../../src/types/project_put.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ export type project_query = {
2
+ "limit"?: number;
3
+ "cursor"?: string;
4
+ "sort_order"?: ("ascending" | "descending");
5
+ "_id"?: string;
6
+ "_id_gt"?: string;
7
+ "_id_lt"?: string;
8
+ "_id_in"?: string[];
9
+ "name"?: string;
10
+ "name_gt"?: string;
11
+ "name_lt"?: string;
12
+ "name_in"?: string[];
13
+ "institution_id"?: string;
14
+ "institution_id_gt"?: string;
15
+ "institution_id_lt"?: string;
16
+ "institution_id_in"?: string[];
17
+ "client_id"?: string;
18
+ "client_id_gt"?: string;
19
+ "client_id_lt"?: string;
20
+ "client_id_in"?: string[];
21
+ "project_number"?: number;
22
+ "project_number_gt"?: number;
23
+ "project_number_gte"?: number;
24
+ "project_number_lt"?: number;
25
+ "project_number_lte"?: number;
26
+ "sort"?: ("_id" | "name" | "institution_id" | "client_id" | "project_number");
27
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project_query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project_query.js","sourceRoot":"","sources":["../../src/types/project_query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export declare function encode_search_params(params: {
2
+ [key: string]: string | number | boolean | string[];
3
+ }): {
4
+ [key: string]: string | number | boolean;
5
+ };
6
+ export type Response<Q> = {
7
+ data: Q;
8
+ };
9
+ export type Response_Multiple<Q> = {
10
+ data: Q[];
11
+ };
@@ -0,0 +1,13 @@
1
+ export function encode_search_params(params) {
2
+ let retval = {};
3
+ for (let [key, value] of Object.entries(params)) {
4
+ if (Array.isArray(value)) {
5
+ retval[key] = value.join(',');
6
+ }
7
+ else {
8
+ retval[key] = value;
9
+ }
10
+ }
11
+ return retval;
12
+ }
13
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,oBAAoB,CAAC,MAA6D;IAC9F,IAAI,MAAM,GAAgD,EAAE,CAAA;IAC5D,KAAI,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAC,CAAC;QAC5C,IAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAC,CAAC;YACrB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}