teraprox-core-sdk 0.3.6 → 0.3.7

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.d.mts CHANGED
@@ -104,11 +104,13 @@ declare class NullHttpController implements HttpController {
104
104
  private logAndResolve;
105
105
  get(path?: string): Promise<{
106
106
  id: number;
107
- nome: string;
108
107
  branchLevel: {
109
108
  level: number;
109
+ nome: string;
110
+ color: string;
110
111
  };
111
- status: string;
112
+ nomeRecurso: string;
113
+ branchNodes: never[];
112
114
  }[]> | Promise<{
113
115
  id: number;
114
116
  level: number;
@@ -116,11 +118,13 @@ declare class NullHttpController implements HttpController {
116
118
  }[]>;
117
119
  post(path?: string): Promise<{
118
120
  id: number;
119
- nome: string;
120
121
  branchLevel: {
121
122
  level: number;
123
+ nome: string;
124
+ color: string;
122
125
  };
123
- status: string;
126
+ nomeRecurso: string;
127
+ branchNodes: never[];
124
128
  }[]> | Promise<{
125
129
  id: number;
126
130
  level: number;
@@ -128,11 +132,13 @@ declare class NullHttpController implements HttpController {
128
132
  }[]>;
129
133
  put(path?: string): Promise<{
130
134
  id: number;
131
- nome: string;
132
135
  branchLevel: {
133
136
  level: number;
137
+ nome: string;
138
+ color: string;
134
139
  };
135
- status: string;
140
+ nomeRecurso: string;
141
+ branchNodes: never[];
136
142
  }[]> | Promise<{
137
143
  id: number;
138
144
  level: number;
@@ -140,11 +146,13 @@ declare class NullHttpController implements HttpController {
140
146
  }[]>;
141
147
  patch(path?: string): Promise<{
142
148
  id: number;
143
- nome: string;
144
149
  branchLevel: {
145
150
  level: number;
151
+ nome: string;
152
+ color: string;
146
153
  };
147
- status: string;
154
+ nomeRecurso: string;
155
+ branchNodes: never[];
148
156
  }[]> | Promise<{
149
157
  id: number;
150
158
  level: number;
@@ -152,11 +160,13 @@ declare class NullHttpController implements HttpController {
152
160
  }[]>;
153
161
  delete(path?: string, id?: string | number): Promise<{
154
162
  id: number;
155
- nome: string;
156
163
  branchLevel: {
157
164
  level: number;
165
+ nome: string;
166
+ color: string;
158
167
  };
159
- status: string;
168
+ nomeRecurso: string;
169
+ branchNodes: never[];
160
170
  }[]> | Promise<{
161
171
  id: number;
162
172
  level: number;
@@ -164,11 +174,13 @@ declare class NullHttpController implements HttpController {
164
174
  }[]>;
165
175
  deleteSimple(path?: string): Promise<{
166
176
  id: number;
167
- nome: string;
168
177
  branchLevel: {
169
178
  level: number;
179
+ nome: string;
180
+ color: string;
170
181
  };
171
- status: string;
182
+ nomeRecurso: string;
183
+ branchNodes: never[];
172
184
  }[]> | Promise<{
173
185
  id: number;
174
186
  level: number;
@@ -176,11 +188,13 @@ declare class NullHttpController implements HttpController {
176
188
  }[]>;
177
189
  save(path?: string): Promise<{
178
190
  id: number;
179
- nome: string;
180
191
  branchLevel: {
181
192
  level: number;
193
+ nome: string;
194
+ color: string;
182
195
  };
183
- status: string;
196
+ nomeRecurso: string;
197
+ branchNodes: never[];
184
198
  }[]> | Promise<{
185
199
  id: number;
186
200
  level: number;
@@ -188,11 +202,13 @@ declare class NullHttpController implements HttpController {
188
202
  }[]>;
189
203
  read(path?: string, id?: string | number): Promise<{
190
204
  id: number;
191
- nome: string;
192
205
  branchLevel: {
193
206
  level: number;
207
+ nome: string;
208
+ color: string;
194
209
  };
195
- status: string;
210
+ nomeRecurso: string;
211
+ branchNodes: never[];
196
212
  }[]> | Promise<{
197
213
  id: number;
198
214
  level: number;
@@ -200,11 +216,13 @@ declare class NullHttpController implements HttpController {
200
216
  }[]>;
201
217
  readAll(path?: string): Promise<{
202
218
  id: number;
203
- nome: string;
204
219
  branchLevel: {
205
220
  level: number;
221
+ nome: string;
222
+ color: string;
206
223
  };
207
- status: string;
224
+ nomeRecurso: string;
225
+ branchNodes: never[];
208
226
  }[]> | Promise<{
209
227
  id: number;
210
228
  level: number;
@@ -212,11 +230,13 @@ declare class NullHttpController implements HttpController {
212
230
  }[]>;
213
231
  readAllwithPage(path?: string): Promise<{
214
232
  id: number;
215
- nome: string;
216
233
  branchLevel: {
217
234
  level: number;
235
+ nome: string;
236
+ color: string;
218
237
  };
219
- status: string;
238
+ nomeRecurso: string;
239
+ branchNodes: never[];
220
240
  }[]> | Promise<{
221
241
  id: number;
222
242
  level: number;
@@ -224,11 +244,13 @@ declare class NullHttpController implements HttpController {
224
244
  }[]>;
225
245
  bulkDelete(path?: string): Promise<{
226
246
  id: number;
227
- nome: string;
228
247
  branchLevel: {
229
248
  level: number;
249
+ nome: string;
250
+ color: string;
230
251
  };
231
- status: string;
252
+ nomeRecurso: string;
253
+ branchNodes: never[];
232
254
  }[]> | Promise<{
233
255
  id: number;
234
256
  level: number;
package/dist/index.d.ts CHANGED
@@ -104,11 +104,13 @@ declare class NullHttpController implements HttpController {
104
104
  private logAndResolve;
105
105
  get(path?: string): Promise<{
106
106
  id: number;
107
- nome: string;
108
107
  branchLevel: {
109
108
  level: number;
109
+ nome: string;
110
+ color: string;
110
111
  };
111
- status: string;
112
+ nomeRecurso: string;
113
+ branchNodes: never[];
112
114
  }[]> | Promise<{
113
115
  id: number;
114
116
  level: number;
@@ -116,11 +118,13 @@ declare class NullHttpController implements HttpController {
116
118
  }[]>;
117
119
  post(path?: string): Promise<{
118
120
  id: number;
119
- nome: string;
120
121
  branchLevel: {
121
122
  level: number;
123
+ nome: string;
124
+ color: string;
122
125
  };
123
- status: string;
126
+ nomeRecurso: string;
127
+ branchNodes: never[];
124
128
  }[]> | Promise<{
125
129
  id: number;
126
130
  level: number;
@@ -128,11 +132,13 @@ declare class NullHttpController implements HttpController {
128
132
  }[]>;
129
133
  put(path?: string): Promise<{
130
134
  id: number;
131
- nome: string;
132
135
  branchLevel: {
133
136
  level: number;
137
+ nome: string;
138
+ color: string;
134
139
  };
135
- status: string;
140
+ nomeRecurso: string;
141
+ branchNodes: never[];
136
142
  }[]> | Promise<{
137
143
  id: number;
138
144
  level: number;
@@ -140,11 +146,13 @@ declare class NullHttpController implements HttpController {
140
146
  }[]>;
141
147
  patch(path?: string): Promise<{
142
148
  id: number;
143
- nome: string;
144
149
  branchLevel: {
145
150
  level: number;
151
+ nome: string;
152
+ color: string;
146
153
  };
147
- status: string;
154
+ nomeRecurso: string;
155
+ branchNodes: never[];
148
156
  }[]> | Promise<{
149
157
  id: number;
150
158
  level: number;
@@ -152,11 +160,13 @@ declare class NullHttpController implements HttpController {
152
160
  }[]>;
153
161
  delete(path?: string, id?: string | number): Promise<{
154
162
  id: number;
155
- nome: string;
156
163
  branchLevel: {
157
164
  level: number;
165
+ nome: string;
166
+ color: string;
158
167
  };
159
- status: string;
168
+ nomeRecurso: string;
169
+ branchNodes: never[];
160
170
  }[]> | Promise<{
161
171
  id: number;
162
172
  level: number;
@@ -164,11 +174,13 @@ declare class NullHttpController implements HttpController {
164
174
  }[]>;
165
175
  deleteSimple(path?: string): Promise<{
166
176
  id: number;
167
- nome: string;
168
177
  branchLevel: {
169
178
  level: number;
179
+ nome: string;
180
+ color: string;
170
181
  };
171
- status: string;
182
+ nomeRecurso: string;
183
+ branchNodes: never[];
172
184
  }[]> | Promise<{
173
185
  id: number;
174
186
  level: number;
@@ -176,11 +188,13 @@ declare class NullHttpController implements HttpController {
176
188
  }[]>;
177
189
  save(path?: string): Promise<{
178
190
  id: number;
179
- nome: string;
180
191
  branchLevel: {
181
192
  level: number;
193
+ nome: string;
194
+ color: string;
182
195
  };
183
- status: string;
196
+ nomeRecurso: string;
197
+ branchNodes: never[];
184
198
  }[]> | Promise<{
185
199
  id: number;
186
200
  level: number;
@@ -188,11 +202,13 @@ declare class NullHttpController implements HttpController {
188
202
  }[]>;
189
203
  read(path?: string, id?: string | number): Promise<{
190
204
  id: number;
191
- nome: string;
192
205
  branchLevel: {
193
206
  level: number;
207
+ nome: string;
208
+ color: string;
194
209
  };
195
- status: string;
210
+ nomeRecurso: string;
211
+ branchNodes: never[];
196
212
  }[]> | Promise<{
197
213
  id: number;
198
214
  level: number;
@@ -200,11 +216,13 @@ declare class NullHttpController implements HttpController {
200
216
  }[]>;
201
217
  readAll(path?: string): Promise<{
202
218
  id: number;
203
- nome: string;
204
219
  branchLevel: {
205
220
  level: number;
221
+ nome: string;
222
+ color: string;
206
223
  };
207
- status: string;
224
+ nomeRecurso: string;
225
+ branchNodes: never[];
208
226
  }[]> | Promise<{
209
227
  id: number;
210
228
  level: number;
@@ -212,11 +230,13 @@ declare class NullHttpController implements HttpController {
212
230
  }[]>;
213
231
  readAllwithPage(path?: string): Promise<{
214
232
  id: number;
215
- nome: string;
216
233
  branchLevel: {
217
234
  level: number;
235
+ nome: string;
236
+ color: string;
218
237
  };
219
- status: string;
238
+ nomeRecurso: string;
239
+ branchNodes: never[];
220
240
  }[]> | Promise<{
221
241
  id: number;
222
242
  level: number;
@@ -224,11 +244,13 @@ declare class NullHttpController implements HttpController {
224
244
  }[]>;
225
245
  bulkDelete(path?: string): Promise<{
226
246
  id: number;
227
- nome: string;
228
247
  branchLevel: {
229
248
  level: number;
249
+ nome: string;
250
+ color: string;
230
251
  };
231
- status: string;
252
+ nomeRecurso: string;
253
+ branchNodes: never[];
232
254
  }[]> | Promise<{
233
255
  id: number;
234
256
  level: number;
package/dist/index.js CHANGED
@@ -135,9 +135,9 @@ var NullHttpController = class {
135
135
  return Promise.resolve([
136
136
  {
137
137
  id: 1,
138
- nome: "Planta Industrial Mock",
139
- branchLevel: { level: 1 },
140
- status: "Ativo"
138
+ branchLevel: { level: 1, nome: "Empresa", color: "#ff0000" },
139
+ nomeRecurso: "Escolha a Empresa",
140
+ branchNodes: []
141
141
  }
142
142
  ]);
143
143
  }
@@ -858,7 +858,7 @@ var BranchDropDisplay = ({
858
858
  setMultiSelected([]);
859
859
  };
860
860
  const isLastBranchClicked = () => branches.length > 0 && branches[branches.length - 1].id === branch.id;
861
- const visibleNodes = branch.branchNodes.filter(
861
+ const visibleNodes = (branch.branchNodes || []).filter(
862
862
  (bn) => bn.recurso.nome.toLowerCase().includes(searchTerm.toLowerCase())
863
863
  );
864
864
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
package/dist/index.mjs CHANGED
@@ -30,9 +30,9 @@ var NullHttpController = class {
30
30
  return Promise.resolve([
31
31
  {
32
32
  id: 1,
33
- nome: "Planta Industrial Mock",
34
- branchLevel: { level: 1 },
35
- status: "Ativo"
33
+ branchLevel: { level: 1, nome: "Empresa", color: "#ff0000" },
34
+ nomeRecurso: "Escolha a Empresa",
35
+ branchNodes: []
36
36
  }
37
37
  ]);
38
38
  }
@@ -753,7 +753,7 @@ var BranchDropDisplay = ({
753
753
  setMultiSelected([]);
754
754
  };
755
755
  const isLastBranchClicked = () => branches.length > 0 && branches[branches.length - 1].id === branch.id;
756
- const visibleNodes = branch.branchNodes.filter(
756
+ const visibleNodes = (branch.branchNodes || []).filter(
757
757
  (bn) => bn.recurso.nome.toLowerCase().includes(searchTerm.toLowerCase())
758
758
  );
759
759
  return /* @__PURE__ */ jsxs(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teraprox-core-sdk",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Contrato tipado Core ↔ Federados — interfaces, context, hooks e componentes compartilhados",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",