@liminalfunctions/framework 1.0.43 → 1.0.44

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.
@@ -54,64 +54,80 @@ export class Collection_{{my_built_collection}} {
54
54
  let get_auth = this.get_auth;
55
55
  let collection_id = this.collection_id;
56
56
  let collection_name_plural = this.collection_name_plural;
57
- return {
58
- path: [...path, document_id],
59
- collection_id: collection_id,
60
- document_id: document_id,
61
- collection_name_plural: collection_name_plural,
62
- get_auth: get_auth,
63
- async get(): Promise<{{type_return}}>{
64
- try {
65
- let result = await ky.get([...path, document_id].join('/'), {
66
- headers: {
67
- authorization: await get_auth()
68
- },
69
- }).json() as Response<{{type_return}}>;
70
- return result.data;
71
- } catch(err){
72
- return Promise.reject(err)
73
- }
74
- },
57
+ return new Document(path, collection_id, document_id, collection_name_plural, get_auth);
58
+ }
59
+ }
60
+
61
+
62
+
63
+ class Document {
64
+ path: string[];
65
+ collection_id: string;
66
+ document_id: string;
67
+ collection_name_plural: string;
68
+ get_auth: () => Promise<any>;
69
+
70
+ constructor(path: string[], collection_id: string, document_id: string, collection_name_plural: string, get_auth: () => Promise<any>) {
71
+ this.path = path;
72
+ this.collection_id = collection_id;
73
+ this.document_id = document_id;
74
+ this.collection_name_plural = collection_name_plural;
75
+ this.get_auth = get_auth;
76
+ }
77
+
78
+ async get(): Promise<{{type_return}}>{
79
+ try {
80
+ let result = await ky.get([...this.path, this.document_id].join('/'), {
81
+ headers: {
82
+ authorization: await this.get_auth()
83
+ },
84
+ }).json() as Response<{{type_return}}>;
85
+ return result.data;
86
+ } catch(err){
87
+ return Promise.reject(err)
88
+ }
89
+ }
75
90
 
76
- async put(update: {{type_put}}): Promise<{{type_return}}>{
77
- try {
78
- let result = await ky.put([...path, document_id].join('/'), {
79
- headers: {
80
- authorization: await get_auth()
81
- },
82
- json: update
83
- }).json() as Response<{{type_return}}>;
84
- return result.data;
85
- } catch(err){
86
- return Promise.reject(err)
87
- }
88
- },
89
-
90
- async remove(): Promise<{{type_return}}>{
91
- try {
92
- let result = await ky.delete([...path, document_id].join('/'), {
93
- headers: {
94
- authorization: await get_auth()
95
- },
96
- }).json() as Response<{{type_return}}>;
97
- return result.data;
98
- } catch(err){
99
- return Promise.reject(err)
100
- }
101
- },
91
+ async put(update: {{type_put}}): Promise<{{type_return}}>{
92
+ try {
93
+ let result = await ky.put([...this.path, this.document_id].join('/'), {
94
+ headers: {
95
+ authorization: await this.get_auth()
96
+ },
97
+ json: update
98
+ }).json() as Response<{{type_return}}>;
99
+ return result.data;
100
+ } catch(err){
101
+ return Promise.reject(err)
102
+ }
103
+ }
104
+
105
+ async remove(): Promise<{{type_return}}>{
106
+ try {
107
+ let result = await ky.delete([...this.path, this.document_id].join('/'), {
108
+ headers: {
109
+ authorization: await this.get_auth()
110
+ },
111
+ }).json() as Response<{{type_return}}>;
112
+ return result.data;
113
+ } catch(err){
114
+ return Promise.reject(err)
115
+ }
116
+ }
102
117
 
103
- {{#has_subcollections}}
104
- collection(collection_id: {{child_collection_id_types}}) {
105
- switch(collection_id) {
106
- {{#child_collections}}
107
- case "{{collection_id}}":
108
- return new Collection_{{built_collection}}([...path, document_id, "{{collection_id}}"], get_auth);
109
- {{/child_collections}}
110
- default:
111
- throw new Error(`Api does not have the collection ${collection_id}`)
112
- }
113
- }
114
- {{/has_subcollections}}
118
+ {{#has_subcollections}}
119
+ {{#child_collections}}
120
+ collection(collection_id: "{{collection_id}}"): Collection_{{built_collection}};
121
+ {{/child_collections}}
122
+ collection(collection_id: string) {
123
+ switch(collection_id) {
124
+ {{#child_collections}}
125
+ case "{{collection_id}}":
126
+ return new Collection_{{built_collection}}([...this.path, this.document_id, "{{collection_id}}"], this.get_auth);
127
+ {{/child_collections}}
128
+ default:
129
+ throw new Error(`Api does not have the collection ${collection_id}`)
115
130
  }
116
131
  }
132
+ {{/has_subcollections}}
117
133
  }
@@ -7,18 +7,29 @@ import { Collection_{{built_collection}} } from "{{ built_collection_path }}"
7
7
 
8
8
 
9
9
  export function api(base_url: string, get_auth: () => Promise<any>) {
10
- return {
11
- collection(collection_id: {{child_collection_id_types}}) {
12
- switch(collection_id) {
13
- {{#child_collections}}
14
- case "{{collection_id}}":
15
- return new Collection_{{built_collection}}([base_url, "{{collection_id}}"], get_auth);
16
- {{/child_collections}}
17
- default:
18
- throw new Error(`Api does not have the collection ${collection_id}`)
19
- }
20
- }
21
- }
10
+ return new Api(base_url, get_auth)
22
11
  }
23
12
 
13
+ class Api {
14
+ base_url: string;
15
+ get_auth: () => Promise<any>
16
+
17
+ constructor(base_url: string, get_auth: () => Promise<any>) {
18
+ this.base_url = base_url;
19
+ this.get_auth = get_auth
20
+ }
24
21
 
22
+ {{#child_collections}}
23
+ collection(collection_id: "{{collection_id}}"): Collection_{{built_collection}};
24
+ {{/child_collections}}
25
+ collection(collection_id: string) {
26
+ switch(collection_id) {
27
+ {{#child_collections}}
28
+ case "{{collection_id}}":
29
+ return new Collection_{{built_collection}}([this.base_url, "{{collection_id}}"], this.get_auth);
30
+ {{/child_collections}}
31
+ default:
32
+ throw new Error(`Api does not have the collection ${collection_id}`)
33
+ }
34
+ }
35
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liminalfunctions/framework",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "main": "./dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -54,64 +54,80 @@ export class Collection_{{my_built_collection}} {
54
54
  let get_auth = this.get_auth;
55
55
  let collection_id = this.collection_id;
56
56
  let collection_name_plural = this.collection_name_plural;
57
- return {
58
- path: [...path, document_id],
59
- collection_id: collection_id,
60
- document_id: document_id,
61
- collection_name_plural: collection_name_plural,
62
- get_auth: get_auth,
63
- async get(): Promise<{{type_return}}>{
64
- try {
65
- let result = await ky.get([...path, document_id].join('/'), {
66
- headers: {
67
- authorization: await get_auth()
68
- },
69
- }).json() as Response<{{type_return}}>;
70
- return result.data;
71
- } catch(err){
72
- return Promise.reject(err)
73
- }
74
- },
57
+ return new Document(path, collection_id, document_id, collection_name_plural, get_auth);
58
+ }
59
+ }
60
+
61
+
62
+
63
+ class Document {
64
+ path: string[];
65
+ collection_id: string;
66
+ document_id: string;
67
+ collection_name_plural: string;
68
+ get_auth: () => Promise<any>;
69
+
70
+ constructor(path: string[], collection_id: string, document_id: string, collection_name_plural: string, get_auth: () => Promise<any>) {
71
+ this.path = path;
72
+ this.collection_id = collection_id;
73
+ this.document_id = document_id;
74
+ this.collection_name_plural = collection_name_plural;
75
+ this.get_auth = get_auth;
76
+ }
77
+
78
+ async get(): Promise<{{type_return}}>{
79
+ try {
80
+ let result = await ky.get([...this.path, this.document_id].join('/'), {
81
+ headers: {
82
+ authorization: await this.get_auth()
83
+ },
84
+ }).json() as Response<{{type_return}}>;
85
+ return result.data;
86
+ } catch(err){
87
+ return Promise.reject(err)
88
+ }
89
+ }
75
90
 
76
- async put(update: {{type_put}}): Promise<{{type_return}}>{
77
- try {
78
- let result = await ky.put([...path, document_id].join('/'), {
79
- headers: {
80
- authorization: await get_auth()
81
- },
82
- json: update
83
- }).json() as Response<{{type_return}}>;
84
- return result.data;
85
- } catch(err){
86
- return Promise.reject(err)
87
- }
88
- },
89
-
90
- async remove(): Promise<{{type_return}}>{
91
- try {
92
- let result = await ky.delete([...path, document_id].join('/'), {
93
- headers: {
94
- authorization: await get_auth()
95
- },
96
- }).json() as Response<{{type_return}}>;
97
- return result.data;
98
- } catch(err){
99
- return Promise.reject(err)
100
- }
101
- },
91
+ async put(update: {{type_put}}): Promise<{{type_return}}>{
92
+ try {
93
+ let result = await ky.put([...this.path, this.document_id].join('/'), {
94
+ headers: {
95
+ authorization: await this.get_auth()
96
+ },
97
+ json: update
98
+ }).json() as Response<{{type_return}}>;
99
+ return result.data;
100
+ } catch(err){
101
+ return Promise.reject(err)
102
+ }
103
+ }
104
+
105
+ async remove(): Promise<{{type_return}}>{
106
+ try {
107
+ let result = await ky.delete([...this.path, this.document_id].join('/'), {
108
+ headers: {
109
+ authorization: await this.get_auth()
110
+ },
111
+ }).json() as Response<{{type_return}}>;
112
+ return result.data;
113
+ } catch(err){
114
+ return Promise.reject(err)
115
+ }
116
+ }
102
117
 
103
- {{#has_subcollections}}
104
- collection(collection_id: {{child_collection_id_types}}) {
105
- switch(collection_id) {
106
- {{#child_collections}}
107
- case "{{collection_id}}":
108
- return new Collection_{{built_collection}}([...path, document_id, "{{collection_id}}"], get_auth);
109
- {{/child_collections}}
110
- default:
111
- throw new Error(`Api does not have the collection ${collection_id}`)
112
- }
113
- }
114
- {{/has_subcollections}}
118
+ {{#has_subcollections}}
119
+ {{#child_collections}}
120
+ collection(collection_id: "{{collection_id}}"): Collection_{{built_collection}};
121
+ {{/child_collections}}
122
+ collection(collection_id: string) {
123
+ switch(collection_id) {
124
+ {{#child_collections}}
125
+ case "{{collection_id}}":
126
+ return new Collection_{{built_collection}}([...this.path, this.document_id, "{{collection_id}}"], this.get_auth);
127
+ {{/child_collections}}
128
+ default:
129
+ throw new Error(`Api does not have the collection ${collection_id}`)
115
130
  }
116
131
  }
132
+ {{/has_subcollections}}
117
133
  }
@@ -7,18 +7,29 @@ import { Collection_{{built_collection}} } from "{{ built_collection_path }}"
7
7
 
8
8
 
9
9
  export function api(base_url: string, get_auth: () => Promise<any>) {
10
- return {
11
- collection(collection_id: {{child_collection_id_types}}) {
12
- switch(collection_id) {
13
- {{#child_collections}}
14
- case "{{collection_id}}":
15
- return new Collection_{{built_collection}}([base_url, "{{collection_id}}"], get_auth);
16
- {{/child_collections}}
17
- default:
18
- throw new Error(`Api does not have the collection ${collection_id}`)
19
- }
20
- }
21
- }
10
+ return new Api(base_url, get_auth)
22
11
  }
23
12
 
13
+ class Api {
14
+ base_url: string;
15
+ get_auth: () => Promise<any>
16
+
17
+ constructor(base_url: string, get_auth: () => Promise<any>) {
18
+ this.base_url = base_url;
19
+ this.get_auth = get_auth
20
+ }
24
21
 
22
+ {{#child_collections}}
23
+ collection(collection_id: "{{collection_id}}"): Collection_{{built_collection}};
24
+ {{/child_collections}}
25
+ collection(collection_id: string) {
26
+ switch(collection_id) {
27
+ {{#child_collections}}
28
+ case "{{collection_id}}":
29
+ return new Collection_{{built_collection}}([this.base_url, "{{collection_id}}"], this.get_auth);
30
+ {{/child_collections}}
31
+ default:
32
+ throw new Error(`Api does not have the collection ${collection_id}`)
33
+ }
34
+ }
35
+ }
@@ -10,14 +10,17 @@ export declare class Collection_Brief_News_Category {
10
10
  constructor(path: string[], get_auth: () => Promise<any>);
11
11
  query(query: brief_news_category_query): Promise<brief_news_category[]>;
12
12
  post(document: brief_news_category_post): Promise<brief_news_category>;
13
- document(document_id: string): {
14
- path: string[];
15
- collection_id: string;
16
- document_id: string;
17
- collection_name_plural: string;
18
- get_auth: () => Promise<any>;
19
- get(): Promise<brief_news_category>;
20
- put(update: brief_news_category_put): Promise<brief_news_category>;
21
- remove(): Promise<brief_news_category>;
22
- };
13
+ document(document_id: string): Document;
23
14
  }
15
+ declare class Document {
16
+ path: string[];
17
+ collection_id: string;
18
+ document_id: string;
19
+ collection_name_plural: string;
20
+ get_auth: () => Promise<any>;
21
+ constructor(path: string[], collection_id: string, document_id: string, collection_name_plural: string, get_auth: () => Promise<any>);
22
+ get(): Promise<brief_news_category>;
23
+ put(update: brief_news_category_put): Promise<brief_news_category>;
24
+ remove(): Promise<brief_news_category>;
25
+ }
26
+ export {};
@@ -44,53 +44,61 @@ export class Collection_Brief_News_Category {
44
44
  let get_auth = this.get_auth;
45
45
  let collection_id = this.collection_id;
46
46
  let collection_name_plural = this.collection_name_plural;
47
- return {
48
- path: [...path, document_id],
49
- collection_id: collection_id,
50
- document_id: document_id,
51
- collection_name_plural: collection_name_plural,
52
- get_auth: get_auth,
53
- async get() {
54
- try {
55
- let result = await ky.get([...path, document_id].join('/'), {
56
- headers: {
57
- authorization: await get_auth()
58
- },
59
- }).json();
60
- return result.data;
61
- }
62
- catch (err) {
63
- return Promise.reject(err);
64
- }
65
- },
66
- async put(update) {
67
- try {
68
- let result = await ky.put([...path, document_id].join('/'), {
69
- headers: {
70
- authorization: await get_auth()
71
- },
72
- json: update
73
- }).json();
74
- return result.data;
75
- }
76
- catch (err) {
77
- return Promise.reject(err);
78
- }
79
- },
80
- async remove() {
81
- try {
82
- let result = await ky.delete([...path, document_id].join('/'), {
83
- headers: {
84
- authorization: await get_auth()
85
- },
86
- }).json();
87
- return result.data;
88
- }
89
- catch (err) {
90
- return Promise.reject(err);
91
- }
92
- },
93
- };
47
+ return new Document(path, collection_id, document_id, collection_name_plural, get_auth);
48
+ }
49
+ }
50
+ class Document {
51
+ path;
52
+ collection_id;
53
+ document_id;
54
+ collection_name_plural;
55
+ get_auth;
56
+ constructor(path, collection_id, document_id, collection_name_plural, get_auth) {
57
+ this.path = path;
58
+ this.collection_id = collection_id;
59
+ this.document_id = document_id;
60
+ this.collection_name_plural = collection_name_plural;
61
+ this.get_auth = get_auth;
62
+ }
63
+ async get() {
64
+ try {
65
+ let result = await ky.get([...this.path, this.document_id].join('/'), {
66
+ headers: {
67
+ authorization: await this.get_auth()
68
+ },
69
+ }).json();
70
+ return result.data;
71
+ }
72
+ catch (err) {
73
+ return Promise.reject(err);
74
+ }
75
+ }
76
+ async put(update) {
77
+ try {
78
+ let result = await ky.put([...this.path, this.document_id].join('/'), {
79
+ headers: {
80
+ authorization: await this.get_auth()
81
+ },
82
+ json: update
83
+ }).json();
84
+ return result.data;
85
+ }
86
+ catch (err) {
87
+ return Promise.reject(err);
88
+ }
89
+ }
90
+ async remove() {
91
+ try {
92
+ let result = await ky.delete([...this.path, this.document_id].join('/'), {
93
+ headers: {
94
+ authorization: await this.get_auth()
95
+ },
96
+ }).json();
97
+ return result.data;
98
+ }
99
+ catch (err) {
100
+ return Promise.reject(err);
101
+ }
94
102
  }
95
103
  }
96
104
  //# sourceMappingURL=Brief_News_Category.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Brief_News_Category.js","sourceRoot":"","sources":["../src/Brief_News_Category.ts"],"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,CAAC;QACvB,CAAC;QAAC,OAAM,GAAG,EAAC,CAAC;YACT,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC9B,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM;QACR,IAAI,CAAC;YACD,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACrE,OAAO,EAAE;oBACL,aAAa,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE;iBACvC;aACJ,CAAC,CAAC,IAAI,EAAmC,CAAC;YAC3C,OAAO,MAAM,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAM,GAAG,EAAC,CAAC;YACT,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC9B,CAAC;IACL,CAAC;CAEJ"}
@@ -12,15 +12,19 @@ export declare class Collection_Client {
12
12
  constructor(path: string[], get_auth: () => Promise<any>);
13
13
  query(query: client_query): Promise<client[]>;
14
14
  post(document: client_post): Promise<client>;
15
- document(document_id: string): {
16
- path: string[];
17
- collection_id: string;
18
- document_id: string;
19
- collection_name_plural: string;
20
- get_auth: () => Promise<any>;
21
- get(): Promise<client>;
22
- put(update: client_put): Promise<client>;
23
- remove(): Promise<client>;
24
- collection(collection_id: "project" | "brief_news_category"): Collection_Brief_News_Category | Collection_Project;
25
- };
15
+ document(document_id: string): Document;
26
16
  }
17
+ declare class Document {
18
+ path: string[];
19
+ collection_id: string;
20
+ document_id: string;
21
+ collection_name_plural: string;
22
+ get_auth: () => Promise<any>;
23
+ constructor(path: string[], collection_id: string, document_id: string, collection_name_plural: string, get_auth: () => Promise<any>);
24
+ get(): Promise<client>;
25
+ put(update: client_put): Promise<client>;
26
+ remove(): Promise<client>;
27
+ collection(collection_id: "project"): Collection_Project;
28
+ collection(collection_id: "brief_news_category"): Collection_Brief_News_Category;
29
+ }
30
+ export {};