@budibase/server 1.0.81 → 1.0.82
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/builder/assets/{index.f89561ac.js → index.5d245850.js} +140 -139
- package/builder/assets/{index.dd19c61c.css → index.7c8961b4.css} +2 -2
- package/builder/index.html +2 -2
- package/coverage/clover.xml +10 -5
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +5 -5
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/client.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +18 -18
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +1 -1
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +18 -18
- package/coverage/lcov-report/utilities/index.js.html +34 -10
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +17 -6
- package/dist/api/controllers/public/rows.js +2 -1
- package/dist/api/controllers/row/external.js +4 -4
- package/dist/api/routes/public/applications.js +1 -8
- package/dist/api/routes/public/queries.js +1 -8
- package/dist/api/routes/public/tables.js +1 -8
- package/dist/api/routes/public/users.js +1 -8
- package/dist/package.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/index.js +7 -0
- package/package.json +5 -5
- package/scripts/docs/toSwagger.js +1 -1
- package/specs/openapi.json +429 -48
- package/specs/openapi.yaml +337 -32
- package/specs/resources/application.js +6 -0
- package/specs/resources/query.js +6 -0
- package/specs/resources/table.js +6 -0
- package/specs/resources/user.js +6 -0
- package/src/api/controllers/public/rows.ts +2 -1
- package/src/api/controllers/row/external.js +4 -4
- package/src/api/routes/public/applications.ts +1 -8
- package/src/api/routes/public/queries.ts +1 -8
- package/src/api/routes/public/tables.ts +1 -8
- package/src/api/routes/public/users.ts +1 -8
- package/src/definitions/openapi.ts +194 -12
- package/src/utilities/index.js +8 -0
|
@@ -95,9 +95,7 @@ export interface paths {
|
|
|
95
95
|
/** Returns the applications that were found based on the search parameters. */
|
|
96
96
|
200: {
|
|
97
97
|
content: {
|
|
98
|
-
"application/json":
|
|
99
|
-
data: components["schemas"]["application"][]
|
|
100
|
-
}
|
|
98
|
+
"application/json": components["schemas"]["applicationSearch"]
|
|
101
99
|
}
|
|
102
100
|
}
|
|
103
101
|
}
|
|
@@ -149,9 +147,7 @@ export interface paths {
|
|
|
149
147
|
/** Returns the queries found based on the search parameters. */
|
|
150
148
|
200: {
|
|
151
149
|
content: {
|
|
152
|
-
"application/json":
|
|
153
|
-
data: components["schemas"]["query"][]
|
|
154
|
-
}
|
|
150
|
+
"application/json": components["schemas"]["querySearch"]
|
|
155
151
|
}
|
|
156
152
|
}
|
|
157
153
|
}
|
|
@@ -449,9 +445,7 @@ export interface paths {
|
|
|
449
445
|
/** Returns the found tables, based on the search parameters. */
|
|
450
446
|
200: {
|
|
451
447
|
content: {
|
|
452
|
-
"application/json":
|
|
453
|
-
data: components["schemas"]["table"][]
|
|
454
|
-
}
|
|
448
|
+
"application/json": components["schemas"]["tableSearch"]
|
|
455
449
|
}
|
|
456
450
|
}
|
|
457
451
|
}
|
|
@@ -541,9 +535,7 @@ export interface paths {
|
|
|
541
535
|
/** Returns the found users based on search parameters. */
|
|
542
536
|
200: {
|
|
543
537
|
content: {
|
|
544
|
-
"application/json":
|
|
545
|
-
data: components["schemas"]["user"][]
|
|
546
|
-
}
|
|
538
|
+
"application/json": components["schemas"]["userSearch"]
|
|
547
539
|
}
|
|
548
540
|
}
|
|
549
541
|
}
|
|
@@ -589,6 +581,31 @@ export interface components {
|
|
|
589
581
|
lockedBy?: { [key: string]: unknown }
|
|
590
582
|
}
|
|
591
583
|
}
|
|
584
|
+
applicationSearch: {
|
|
585
|
+
data: {
|
|
586
|
+
/** @description The name of the app. */
|
|
587
|
+
name: string
|
|
588
|
+
/** @description The URL by which the app is accessed, this must be URL encoded. */
|
|
589
|
+
url: string
|
|
590
|
+
/** @description The ID of the app. */
|
|
591
|
+
_id: string
|
|
592
|
+
/**
|
|
593
|
+
* @description The status of the app, stating it if is the development or published version.
|
|
594
|
+
* @enum {string}
|
|
595
|
+
*/
|
|
596
|
+
status: "development" | "published"
|
|
597
|
+
/** @description States when the app was created, will be constant. Stored in ISO format. */
|
|
598
|
+
createdAt: string
|
|
599
|
+
/** @description States the last time the app was updated - stored in ISO format. */
|
|
600
|
+
updatedAt: string
|
|
601
|
+
/** @description States the version of the Budibase client this app is currently based on. */
|
|
602
|
+
version: string
|
|
603
|
+
/** @description In a multi-tenant environment this will state the tenant this app is within. */
|
|
604
|
+
tenantId?: string
|
|
605
|
+
/** @description The user this app is currently being built by. */
|
|
606
|
+
lockedBy?: { [key: string]: unknown }
|
|
607
|
+
}[]
|
|
608
|
+
}
|
|
592
609
|
/** @description The row to be created/updated, based on the table schema. */
|
|
593
610
|
row: { [key: string]: unknown }
|
|
594
611
|
searchOutput: {
|
|
@@ -817,6 +834,113 @@ export interface components {
|
|
|
817
834
|
_id: string
|
|
818
835
|
}
|
|
819
836
|
}
|
|
837
|
+
tableSearch: {
|
|
838
|
+
data: {
|
|
839
|
+
/** @description The name of the table. */
|
|
840
|
+
name: string
|
|
841
|
+
/** @description The name of the column which should be used in relationship tags when relating to this table. */
|
|
842
|
+
primaryDisplay?: string
|
|
843
|
+
schema: {
|
|
844
|
+
[key: string]:
|
|
845
|
+
| {
|
|
846
|
+
/**
|
|
847
|
+
* @description A relationship column.
|
|
848
|
+
* @enum {string}
|
|
849
|
+
*/
|
|
850
|
+
type?: "link"
|
|
851
|
+
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
852
|
+
constraints?: {
|
|
853
|
+
/** @enum {string} */
|
|
854
|
+
type?: "string" | "number" | "object" | "boolean"
|
|
855
|
+
/** @description Defines whether the column is required or not. */
|
|
856
|
+
presence?: boolean
|
|
857
|
+
}
|
|
858
|
+
/** @description The name of the column. */
|
|
859
|
+
name?: string
|
|
860
|
+
/** @description Defines whether the column is automatically generated. */
|
|
861
|
+
autocolumn?: boolean
|
|
862
|
+
/** @description The name of the column which a relationship column is related to in another table. */
|
|
863
|
+
fieldName?: string
|
|
864
|
+
/** @description The ID of the table which a relationship column is related to. */
|
|
865
|
+
tableId?: string
|
|
866
|
+
/**
|
|
867
|
+
* @description Defines the type of relationship that this column will be used for.
|
|
868
|
+
* @enum {string}
|
|
869
|
+
*/
|
|
870
|
+
relationshipType?:
|
|
871
|
+
| "one-to-many"
|
|
872
|
+
| "many-to-one"
|
|
873
|
+
| "many-to-many"
|
|
874
|
+
/** @description When using a SQL table that contains many to many relationships this defines the table the relationships are linked through. */
|
|
875
|
+
through?: string
|
|
876
|
+
/** @description When using a SQL table that contains a one to many relationship this defines the foreign key. */
|
|
877
|
+
foreignKey?: string
|
|
878
|
+
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for this table. */
|
|
879
|
+
throughFrom?: string
|
|
880
|
+
/** @description When using a SQL table that utilises a through table, this defines the primary key in the through table for the related table. */
|
|
881
|
+
throughTo?: string
|
|
882
|
+
}
|
|
883
|
+
| {
|
|
884
|
+
/**
|
|
885
|
+
* @description A formula column.
|
|
886
|
+
* @enum {string}
|
|
887
|
+
*/
|
|
888
|
+
type?: "formula"
|
|
889
|
+
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
890
|
+
constraints?: {
|
|
891
|
+
/** @enum {string} */
|
|
892
|
+
type?: "string" | "number" | "object" | "boolean"
|
|
893
|
+
/** @description Defines whether the column is required or not. */
|
|
894
|
+
presence?: boolean
|
|
895
|
+
}
|
|
896
|
+
/** @description The name of the column. */
|
|
897
|
+
name?: string
|
|
898
|
+
/** @description Defines whether the column is automatically generated. */
|
|
899
|
+
autocolumn?: boolean
|
|
900
|
+
/** @description Defines a Handlebars or JavaScript formula to use, note that Javascript formulas are expected to be provided in the base64 format. */
|
|
901
|
+
formula?: string
|
|
902
|
+
/**
|
|
903
|
+
* @description Defines whether this is a static or dynamic formula.
|
|
904
|
+
* @enum {string}
|
|
905
|
+
*/
|
|
906
|
+
formulaType?: "static" | "dynamic"
|
|
907
|
+
}
|
|
908
|
+
| {
|
|
909
|
+
/**
|
|
910
|
+
* @description Defines the type of the column, most explain themselves, a link column is a relationship.
|
|
911
|
+
* @enum {string}
|
|
912
|
+
*/
|
|
913
|
+
type?:
|
|
914
|
+
| "string"
|
|
915
|
+
| "longform"
|
|
916
|
+
| "options"
|
|
917
|
+
| "number"
|
|
918
|
+
| "boolean"
|
|
919
|
+
| "array"
|
|
920
|
+
| "datetime"
|
|
921
|
+
| "attachment"
|
|
922
|
+
| "link"
|
|
923
|
+
| "formula"
|
|
924
|
+
| "auto"
|
|
925
|
+
| "json"
|
|
926
|
+
| "internal"
|
|
927
|
+
/** @description A constraint can be applied to the column which will be validated against when a row is saved. */
|
|
928
|
+
constraints?: {
|
|
929
|
+
/** @enum {string} */
|
|
930
|
+
type?: "string" | "number" | "object" | "boolean"
|
|
931
|
+
/** @description Defines whether the column is required or not. */
|
|
932
|
+
presence?: boolean
|
|
933
|
+
}
|
|
934
|
+
/** @description The name of the column. */
|
|
935
|
+
name?: string
|
|
936
|
+
/** @description Defines whether the column is automatically generated. */
|
|
937
|
+
autocolumn?: boolean
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
/** @description The ID of the table. */
|
|
941
|
+
_id: string
|
|
942
|
+
}[]
|
|
943
|
+
}
|
|
820
944
|
/** @description The query body must contain the required parameters for the query, this depends on query type, setup and bindings. */
|
|
821
945
|
executeQuery: { [key: string]: unknown }
|
|
822
946
|
executeQueryOutput: {
|
|
@@ -855,6 +979,31 @@ export interface components {
|
|
|
855
979
|
/** @description Whether the query has readable data. */
|
|
856
980
|
readable?: boolean
|
|
857
981
|
}
|
|
982
|
+
querySearch: {
|
|
983
|
+
data: {
|
|
984
|
+
/** @description The ID of the query. */
|
|
985
|
+
_id: string
|
|
986
|
+
/** @description The ID of the data source the query belongs to. */
|
|
987
|
+
datasourceId?: string
|
|
988
|
+
/** @description The bindings which are required to perform this query. */
|
|
989
|
+
parameters?: string[]
|
|
990
|
+
/** @description The fields that are used to perform this query, e.g. the sql statement */
|
|
991
|
+
fields?: { [key: string]: unknown }
|
|
992
|
+
/**
|
|
993
|
+
* @description The verb that describes this query.
|
|
994
|
+
* @enum {undefined}
|
|
995
|
+
*/
|
|
996
|
+
queryVerb?: "create" | "read" | "update" | "delete"
|
|
997
|
+
/** @description The name of the query. */
|
|
998
|
+
name: string
|
|
999
|
+
/** @description The schema of the data returned when the query is executed. */
|
|
1000
|
+
schema: { [key: string]: unknown }
|
|
1001
|
+
/** @description The JavaScript transformer function, applied after the query responds with data. */
|
|
1002
|
+
transformer?: string
|
|
1003
|
+
/** @description Whether the query has readable data. */
|
|
1004
|
+
readable?: boolean
|
|
1005
|
+
}[]
|
|
1006
|
+
}
|
|
858
1007
|
user: {
|
|
859
1008
|
/** @description The email address of the user, this must be unique. */
|
|
860
1009
|
email: string
|
|
@@ -917,6 +1066,39 @@ export interface components {
|
|
|
917
1066
|
_id: string
|
|
918
1067
|
}
|
|
919
1068
|
}
|
|
1069
|
+
userSearch: {
|
|
1070
|
+
data: {
|
|
1071
|
+
/** @description The email address of the user, this must be unique. */
|
|
1072
|
+
email: string
|
|
1073
|
+
/** @description The password of the user if using password based login - this will never be returned. This can be left out of subsequent requests (updates) and will be enriched back into the user structure. */
|
|
1074
|
+
password?: string
|
|
1075
|
+
/**
|
|
1076
|
+
* @description The status of the user, if they are active.
|
|
1077
|
+
* @enum {string}
|
|
1078
|
+
*/
|
|
1079
|
+
status?: "active"
|
|
1080
|
+
/** @description The first name of the user */
|
|
1081
|
+
firstName?: string
|
|
1082
|
+
/** @description The last name of the user */
|
|
1083
|
+
lastName?: string
|
|
1084
|
+
/** @description If set to true forces the user to reset their password on first login. */
|
|
1085
|
+
forceResetPassword?: boolean
|
|
1086
|
+
/** @description Describes if the user is a builder user or not. */
|
|
1087
|
+
builder?: {
|
|
1088
|
+
/** @description If set to true the user will be able to build any app in the system. */
|
|
1089
|
+
global?: boolean
|
|
1090
|
+
}
|
|
1091
|
+
/** @description Describes if the user is an admin user or not. */
|
|
1092
|
+
admin?: {
|
|
1093
|
+
/** @description If set to true the user will be able to administrate the system. */
|
|
1094
|
+
global?: boolean
|
|
1095
|
+
}
|
|
1096
|
+
/** @description Contains the roles of the user per app (assuming they are not a builder user). */
|
|
1097
|
+
roles: { [key: string]: string }
|
|
1098
|
+
/** @description The ID of the user. */
|
|
1099
|
+
_id: string
|
|
1100
|
+
}[]
|
|
1101
|
+
}
|
|
920
1102
|
nameSearch: {
|
|
921
1103
|
/** @description The name to be used when searching - this will be used in a case insensitive starts with match. */
|
|
922
1104
|
name: string
|
package/src/utilities/index.js
CHANGED
|
@@ -151,3 +151,11 @@ exports.formatBytes = bytes => {
|
|
|
151
151
|
}
|
|
152
152
|
return `${size.toFixed(size < 10 && unit > 0 ? 1 : 0)}${units[unit]}`
|
|
153
153
|
}
|
|
154
|
+
|
|
155
|
+
exports.convertBookmark = bookmark => {
|
|
156
|
+
const IS_NUMBER = /^\d+\.?\d*$/
|
|
157
|
+
if (typeof bookmark === "string" && bookmark.match(IS_NUMBER)) {
|
|
158
|
+
return parseFloat(bookmark)
|
|
159
|
+
}
|
|
160
|
+
return bookmark
|
|
161
|
+
}
|