@budibase/server 1.0.81 → 1.0.84-alpha.0
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.0297e6da.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 -10
- 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 +430 -55
- package/specs/openapi.yaml +337 -35
- package/specs/resources/application.js +7 -1
- 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 -10
- 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 +591 -415
- package/src/utilities/index.js +8 -0
package/specs/openapi.yaml
CHANGED
|
@@ -309,7 +309,6 @@ components:
|
|
|
309
309
|
type: string
|
|
310
310
|
required:
|
|
311
311
|
- name
|
|
312
|
-
- url
|
|
313
312
|
applicationOutput:
|
|
314
313
|
type: object
|
|
315
314
|
properties:
|
|
@@ -360,6 +359,58 @@ components:
|
|
|
360
359
|
- version
|
|
361
360
|
required:
|
|
362
361
|
- data
|
|
362
|
+
applicationSearch:
|
|
363
|
+
type: object
|
|
364
|
+
properties:
|
|
365
|
+
data:
|
|
366
|
+
type: array
|
|
367
|
+
items:
|
|
368
|
+
type: object
|
|
369
|
+
properties:
|
|
370
|
+
name:
|
|
371
|
+
description: The name of the app.
|
|
372
|
+
type: string
|
|
373
|
+
url:
|
|
374
|
+
description: The URL by which the app is accessed, this must be URL encoded.
|
|
375
|
+
type: string
|
|
376
|
+
_id:
|
|
377
|
+
description: The ID of the app.
|
|
378
|
+
type: string
|
|
379
|
+
status:
|
|
380
|
+
description: The status of the app, stating it if is the development or
|
|
381
|
+
published version.
|
|
382
|
+
type: string
|
|
383
|
+
enum:
|
|
384
|
+
- development
|
|
385
|
+
- published
|
|
386
|
+
createdAt:
|
|
387
|
+
description: States when the app was created, will be constant. Stored in ISO
|
|
388
|
+
format.
|
|
389
|
+
type: string
|
|
390
|
+
updatedAt:
|
|
391
|
+
description: States the last time the app was updated - stored in ISO format.
|
|
392
|
+
type: string
|
|
393
|
+
version:
|
|
394
|
+
description: States the version of the Budibase client this app is currently
|
|
395
|
+
based on.
|
|
396
|
+
type: string
|
|
397
|
+
tenantId:
|
|
398
|
+
description: In a multi-tenant environment this will state the tenant this app
|
|
399
|
+
is within.
|
|
400
|
+
type: string
|
|
401
|
+
lockedBy:
|
|
402
|
+
description: The user this app is currently being built by.
|
|
403
|
+
type: object
|
|
404
|
+
required:
|
|
405
|
+
- _id
|
|
406
|
+
- name
|
|
407
|
+
- url
|
|
408
|
+
- status
|
|
409
|
+
- createdAt
|
|
410
|
+
- updatedAt
|
|
411
|
+
- version
|
|
412
|
+
required:
|
|
413
|
+
- data
|
|
363
414
|
row:
|
|
364
415
|
description: The row to be created/updated, based on the table schema.
|
|
365
416
|
type: object
|
|
@@ -730,6 +781,175 @@ components:
|
|
|
730
781
|
type: string
|
|
731
782
|
required:
|
|
732
783
|
- data
|
|
784
|
+
tableSearch:
|
|
785
|
+
type: object
|
|
786
|
+
properties:
|
|
787
|
+
data:
|
|
788
|
+
type: array
|
|
789
|
+
items:
|
|
790
|
+
description: The table to be created/updated.
|
|
791
|
+
type: object
|
|
792
|
+
required:
|
|
793
|
+
- name
|
|
794
|
+
- schema
|
|
795
|
+
- _id
|
|
796
|
+
properties:
|
|
797
|
+
name:
|
|
798
|
+
description: The name of the table.
|
|
799
|
+
type: string
|
|
800
|
+
primaryDisplay:
|
|
801
|
+
type: string
|
|
802
|
+
description: The name of the column which should be used in relationship tags
|
|
803
|
+
when relating to this table.
|
|
804
|
+
schema:
|
|
805
|
+
type: object
|
|
806
|
+
additionalProperties:
|
|
807
|
+
oneOf:
|
|
808
|
+
- type: object
|
|
809
|
+
properties:
|
|
810
|
+
type:
|
|
811
|
+
type: string
|
|
812
|
+
enum:
|
|
813
|
+
- link
|
|
814
|
+
description: A relationship column.
|
|
815
|
+
constraints:
|
|
816
|
+
type: object
|
|
817
|
+
description: A constraint can be applied to the column which will be validated
|
|
818
|
+
against when a row is saved.
|
|
819
|
+
properties:
|
|
820
|
+
type:
|
|
821
|
+
type: string
|
|
822
|
+
enum:
|
|
823
|
+
- string
|
|
824
|
+
- number
|
|
825
|
+
- object
|
|
826
|
+
- boolean
|
|
827
|
+
presence:
|
|
828
|
+
type: boolean
|
|
829
|
+
description: Defines whether the column is required or not.
|
|
830
|
+
name:
|
|
831
|
+
type: string
|
|
832
|
+
description: The name of the column.
|
|
833
|
+
autocolumn:
|
|
834
|
+
type: boolean
|
|
835
|
+
description: Defines whether the column is automatically generated.
|
|
836
|
+
fieldName:
|
|
837
|
+
type: string
|
|
838
|
+
description: The name of the column which a relationship column is related to in
|
|
839
|
+
another table.
|
|
840
|
+
tableId:
|
|
841
|
+
type: string
|
|
842
|
+
description: The ID of the table which a relationship column is related to.
|
|
843
|
+
relationshipType:
|
|
844
|
+
type: string
|
|
845
|
+
enum:
|
|
846
|
+
- one-to-many
|
|
847
|
+
- many-to-one
|
|
848
|
+
- many-to-many
|
|
849
|
+
description: Defines the type of relationship that this column will be used for.
|
|
850
|
+
through:
|
|
851
|
+
type: string
|
|
852
|
+
description: When using a SQL table that contains many to many relationships
|
|
853
|
+
this defines the table the relationships are linked
|
|
854
|
+
through.
|
|
855
|
+
foreignKey:
|
|
856
|
+
type: string
|
|
857
|
+
description: When using a SQL table that contains a one to many relationship
|
|
858
|
+
this defines the foreign key.
|
|
859
|
+
throughFrom:
|
|
860
|
+
type: string
|
|
861
|
+
description: When using a SQL table that utilises a through table, this defines
|
|
862
|
+
the primary key in the through table for this table.
|
|
863
|
+
throughTo:
|
|
864
|
+
type: string
|
|
865
|
+
description: When using a SQL table that utilises a through table, this defines
|
|
866
|
+
the primary key in the through table for the related
|
|
867
|
+
table.
|
|
868
|
+
- type: object
|
|
869
|
+
properties:
|
|
870
|
+
type:
|
|
871
|
+
type: string
|
|
872
|
+
enum:
|
|
873
|
+
- formula
|
|
874
|
+
description: A formula column.
|
|
875
|
+
constraints:
|
|
876
|
+
type: object
|
|
877
|
+
description: A constraint can be applied to the column which will be validated
|
|
878
|
+
against when a row is saved.
|
|
879
|
+
properties:
|
|
880
|
+
type:
|
|
881
|
+
type: string
|
|
882
|
+
enum:
|
|
883
|
+
- string
|
|
884
|
+
- number
|
|
885
|
+
- object
|
|
886
|
+
- boolean
|
|
887
|
+
presence:
|
|
888
|
+
type: boolean
|
|
889
|
+
description: Defines whether the column is required or not.
|
|
890
|
+
name:
|
|
891
|
+
type: string
|
|
892
|
+
description: The name of the column.
|
|
893
|
+
autocolumn:
|
|
894
|
+
type: boolean
|
|
895
|
+
description: Defines whether the column is automatically generated.
|
|
896
|
+
formula:
|
|
897
|
+
type: string
|
|
898
|
+
description: Defines a Handlebars or JavaScript formula to use, note that
|
|
899
|
+
Javascript formulas are expected to be provided in
|
|
900
|
+
the base64 format.
|
|
901
|
+
formulaType:
|
|
902
|
+
type: string
|
|
903
|
+
enum:
|
|
904
|
+
- static
|
|
905
|
+
- dynamic
|
|
906
|
+
description: Defines whether this is a static or dynamic formula.
|
|
907
|
+
- type: object
|
|
908
|
+
properties:
|
|
909
|
+
type:
|
|
910
|
+
type: string
|
|
911
|
+
enum:
|
|
912
|
+
- string
|
|
913
|
+
- longform
|
|
914
|
+
- options
|
|
915
|
+
- number
|
|
916
|
+
- boolean
|
|
917
|
+
- array
|
|
918
|
+
- datetime
|
|
919
|
+
- attachment
|
|
920
|
+
- link
|
|
921
|
+
- formula
|
|
922
|
+
- auto
|
|
923
|
+
- json
|
|
924
|
+
- internal
|
|
925
|
+
description: Defines the type of the column, most explain themselves, a link
|
|
926
|
+
column is a relationship.
|
|
927
|
+
constraints:
|
|
928
|
+
type: object
|
|
929
|
+
description: A constraint can be applied to the column which will be validated
|
|
930
|
+
against when a row is saved.
|
|
931
|
+
properties:
|
|
932
|
+
type:
|
|
933
|
+
type: string
|
|
934
|
+
enum:
|
|
935
|
+
- string
|
|
936
|
+
- number
|
|
937
|
+
- object
|
|
938
|
+
- boolean
|
|
939
|
+
presence:
|
|
940
|
+
type: boolean
|
|
941
|
+
description: Defines whether the column is required or not.
|
|
942
|
+
name:
|
|
943
|
+
type: string
|
|
944
|
+
description: The name of the column.
|
|
945
|
+
autocolumn:
|
|
946
|
+
type: boolean
|
|
947
|
+
description: Defines whether the column is automatically generated.
|
|
948
|
+
_id:
|
|
949
|
+
description: The ID of the table.
|
|
950
|
+
type: string
|
|
951
|
+
required:
|
|
952
|
+
- data
|
|
733
953
|
executeQuery:
|
|
734
954
|
description: The query body must contain the required parameters for the query,
|
|
735
955
|
this depends on query type, setup and bindings.
|
|
@@ -803,6 +1023,55 @@ components:
|
|
|
803
1023
|
- name
|
|
804
1024
|
- schema
|
|
805
1025
|
- _id
|
|
1026
|
+
querySearch:
|
|
1027
|
+
type: object
|
|
1028
|
+
properties:
|
|
1029
|
+
data:
|
|
1030
|
+
type: array
|
|
1031
|
+
items:
|
|
1032
|
+
type: object
|
|
1033
|
+
properties:
|
|
1034
|
+
_id:
|
|
1035
|
+
description: The ID of the query.
|
|
1036
|
+
type: string
|
|
1037
|
+
datasourceId:
|
|
1038
|
+
description: The ID of the data source the query belongs to.
|
|
1039
|
+
type: string
|
|
1040
|
+
parameters:
|
|
1041
|
+
description: The bindings which are required to perform this query.
|
|
1042
|
+
type: array
|
|
1043
|
+
items:
|
|
1044
|
+
type: string
|
|
1045
|
+
fields:
|
|
1046
|
+
description: The fields that are used to perform this query, e.g. the sql
|
|
1047
|
+
statement
|
|
1048
|
+
type: object
|
|
1049
|
+
queryVerb:
|
|
1050
|
+
description: The verb that describes this query.
|
|
1051
|
+
enum:
|
|
1052
|
+
- create
|
|
1053
|
+
- read
|
|
1054
|
+
- update
|
|
1055
|
+
- delete
|
|
1056
|
+
name:
|
|
1057
|
+
description: The name of the query.
|
|
1058
|
+
type: string
|
|
1059
|
+
schema:
|
|
1060
|
+
description: The schema of the data returned when the query is executed.
|
|
1061
|
+
type: object
|
|
1062
|
+
transformer:
|
|
1063
|
+
description: The JavaScript transformer function, applied after the query
|
|
1064
|
+
responds with data.
|
|
1065
|
+
type: string
|
|
1066
|
+
readable:
|
|
1067
|
+
description: Whether the query has readable data.
|
|
1068
|
+
type: boolean
|
|
1069
|
+
required:
|
|
1070
|
+
- name
|
|
1071
|
+
- schema
|
|
1072
|
+
- _id
|
|
1073
|
+
required:
|
|
1074
|
+
- data
|
|
806
1075
|
user:
|
|
807
1076
|
type: object
|
|
808
1077
|
properties:
|
|
@@ -916,6 +1185,69 @@ components:
|
|
|
916
1185
|
- _id
|
|
917
1186
|
required:
|
|
918
1187
|
- data
|
|
1188
|
+
userSearch:
|
|
1189
|
+
type: object
|
|
1190
|
+
properties:
|
|
1191
|
+
data:
|
|
1192
|
+
type: array
|
|
1193
|
+
items:
|
|
1194
|
+
type: object
|
|
1195
|
+
properties:
|
|
1196
|
+
email:
|
|
1197
|
+
description: The email address of the user, this must be unique.
|
|
1198
|
+
type: string
|
|
1199
|
+
password:
|
|
1200
|
+
description: The password of the user if using password based login - this will
|
|
1201
|
+
never be returned. This can be left out of subsequent requests
|
|
1202
|
+
(updates) and will be enriched back into the user structure.
|
|
1203
|
+
type: string
|
|
1204
|
+
status:
|
|
1205
|
+
description: The status of the user, if they are active.
|
|
1206
|
+
type: string
|
|
1207
|
+
enum:
|
|
1208
|
+
- active
|
|
1209
|
+
firstName:
|
|
1210
|
+
description: The first name of the user
|
|
1211
|
+
type: string
|
|
1212
|
+
lastName:
|
|
1213
|
+
description: The last name of the user
|
|
1214
|
+
type: string
|
|
1215
|
+
forceResetPassword:
|
|
1216
|
+
description: If set to true forces the user to reset their password on first
|
|
1217
|
+
login.
|
|
1218
|
+
type: boolean
|
|
1219
|
+
builder:
|
|
1220
|
+
description: Describes if the user is a builder user or not.
|
|
1221
|
+
type: object
|
|
1222
|
+
properties:
|
|
1223
|
+
global:
|
|
1224
|
+
description: If set to true the user will be able to build any app in the
|
|
1225
|
+
system.
|
|
1226
|
+
type: boolean
|
|
1227
|
+
admin:
|
|
1228
|
+
description: Describes if the user is an admin user or not.
|
|
1229
|
+
type: object
|
|
1230
|
+
properties:
|
|
1231
|
+
global:
|
|
1232
|
+
description: If set to true the user will be able to administrate the system.
|
|
1233
|
+
type: boolean
|
|
1234
|
+
roles:
|
|
1235
|
+
description: Contains the roles of the user per app (assuming they are not a
|
|
1236
|
+
builder user).
|
|
1237
|
+
type: object
|
|
1238
|
+
additionalProperties:
|
|
1239
|
+
type: string
|
|
1240
|
+
description: A map of app ID (production app ID, minus the _dev component) to a
|
|
1241
|
+
role ID, e.g. ADMIN.
|
|
1242
|
+
_id:
|
|
1243
|
+
description: The ID of the user.
|
|
1244
|
+
type: string
|
|
1245
|
+
required:
|
|
1246
|
+
- email
|
|
1247
|
+
- roles
|
|
1248
|
+
- _id
|
|
1249
|
+
required:
|
|
1250
|
+
- data
|
|
919
1251
|
nameSearch:
|
|
920
1252
|
type: object
|
|
921
1253
|
properties:
|
|
@@ -1013,8 +1345,6 @@ paths:
|
|
|
1013
1345
|
applications.
|
|
1014
1346
|
tags:
|
|
1015
1347
|
- applications
|
|
1016
|
-
parameters:
|
|
1017
|
-
- $ref: "#/components/parameters/appId"
|
|
1018
1348
|
requestBody:
|
|
1019
1349
|
required: true
|
|
1020
1350
|
content:
|
|
@@ -1028,14 +1358,7 @@ paths:
|
|
|
1028
1358
|
content:
|
|
1029
1359
|
application/json:
|
|
1030
1360
|
schema:
|
|
1031
|
-
|
|
1032
|
-
required:
|
|
1033
|
-
- data
|
|
1034
|
-
properties:
|
|
1035
|
-
data:
|
|
1036
|
-
type: array
|
|
1037
|
-
items:
|
|
1038
|
-
$ref: "#/components/schemas/application"
|
|
1361
|
+
$ref: "#/components/schemas/applicationSearch"
|
|
1039
1362
|
examples:
|
|
1040
1363
|
applications:
|
|
1041
1364
|
$ref: "#/components/examples/applications"
|
|
@@ -1087,14 +1410,7 @@ paths:
|
|
|
1087
1410
|
content:
|
|
1088
1411
|
application/json:
|
|
1089
1412
|
schema:
|
|
1090
|
-
|
|
1091
|
-
required:
|
|
1092
|
-
- data
|
|
1093
|
-
properties:
|
|
1094
|
-
data:
|
|
1095
|
-
type: array
|
|
1096
|
-
items:
|
|
1097
|
-
$ref: "#/components/schemas/query"
|
|
1413
|
+
$ref: "#/components/schemas/querySearch"
|
|
1098
1414
|
examples:
|
|
1099
1415
|
queries:
|
|
1100
1416
|
$ref: "#/components/examples/queries"
|
|
@@ -1419,14 +1735,7 @@ paths:
|
|
|
1419
1735
|
content:
|
|
1420
1736
|
application/json:
|
|
1421
1737
|
schema:
|
|
1422
|
-
|
|
1423
|
-
required:
|
|
1424
|
-
- data
|
|
1425
|
-
properties:
|
|
1426
|
-
data:
|
|
1427
|
-
type: array
|
|
1428
|
-
items:
|
|
1429
|
-
$ref: "#/components/schemas/table"
|
|
1738
|
+
$ref: "#/components/schemas/tableSearch"
|
|
1430
1739
|
examples:
|
|
1431
1740
|
tables:
|
|
1432
1741
|
$ref: "#/components/examples/tables"
|
|
@@ -1524,14 +1833,7 @@ paths:
|
|
|
1524
1833
|
content:
|
|
1525
1834
|
application/json:
|
|
1526
1835
|
schema:
|
|
1527
|
-
|
|
1528
|
-
required:
|
|
1529
|
-
- data
|
|
1530
|
-
properties:
|
|
1531
|
-
data:
|
|
1532
|
-
type: array
|
|
1533
|
-
items:
|
|
1534
|
-
$ref: "#/components/schemas/user"
|
|
1836
|
+
$ref: "#/components/schemas/userSearch"
|
|
1535
1837
|
examples:
|
|
1536
1838
|
users:
|
|
1537
1839
|
$ref: "#/components/examples/users"
|
|
@@ -27,7 +27,7 @@ const base = {
|
|
|
27
27
|
},
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const applicationSchema = object(base, { required: ["name"
|
|
30
|
+
const applicationSchema = object(base, { required: ["name"] })
|
|
31
31
|
|
|
32
32
|
const applicationOutputSchema = object(
|
|
33
33
|
{
|
|
@@ -98,4 +98,10 @@ module.exports = new Resource()
|
|
|
98
98
|
applicationOutput: object({
|
|
99
99
|
data: applicationOutputSchema,
|
|
100
100
|
}),
|
|
101
|
+
applicationSearch: object({
|
|
102
|
+
data: {
|
|
103
|
+
type: "array",
|
|
104
|
+
items: applicationOutputSchema,
|
|
105
|
+
},
|
|
106
|
+
}),
|
|
101
107
|
})
|
package/specs/resources/query.js
CHANGED
package/specs/resources/table.js
CHANGED
package/specs/resources/user.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as rowController } from "../row"
|
|
2
2
|
import { addRev } from "./utils"
|
|
3
3
|
import { Row } from "../../../definitions/common"
|
|
4
|
+
import { convertBookmark } from "../../../utilities"
|
|
4
5
|
|
|
5
6
|
// makes sure that the user doesn't need to pass in the type, tableId or _id params for
|
|
6
7
|
// the call to be correct
|
|
@@ -30,7 +31,7 @@ export async function search(ctx: any, next: any) {
|
|
|
30
31
|
sort: sort.column,
|
|
31
32
|
sortType: sort.type,
|
|
32
33
|
sortOrder: sort.order,
|
|
33
|
-
bookmark,
|
|
34
|
+
bookmark: convertBookmark(bookmark),
|
|
34
35
|
paginate,
|
|
35
36
|
limit,
|
|
36
37
|
query,
|
|
@@ -33,11 +33,11 @@ exports.handleRequest = handleRequest
|
|
|
33
33
|
exports.patch = async ctx => {
|
|
34
34
|
const inputs = ctx.request.body
|
|
35
35
|
const tableId = ctx.params.tableId
|
|
36
|
-
const id =
|
|
36
|
+
const id = inputs._id
|
|
37
37
|
// don't save the ID to db
|
|
38
38
|
delete inputs._id
|
|
39
39
|
return handleRequest(DataSourceOperation.UPDATE, tableId, {
|
|
40
|
-
id,
|
|
40
|
+
id: breakRowIdField(id),
|
|
41
41
|
row: inputs,
|
|
42
42
|
})
|
|
43
43
|
}
|
|
@@ -67,7 +67,7 @@ exports.find = async ctx => {
|
|
|
67
67
|
const id = ctx.params.rowId
|
|
68
68
|
const tableId = ctx.params.tableId
|
|
69
69
|
const response = await handleRequest(DataSourceOperation.READ, tableId, {
|
|
70
|
-
id,
|
|
70
|
+
id: breakRowIdField(id),
|
|
71
71
|
})
|
|
72
72
|
return response ? response[0] : response
|
|
73
73
|
}
|
|
@@ -76,7 +76,7 @@ exports.destroy = async ctx => {
|
|
|
76
76
|
const tableId = ctx.params.tableId
|
|
77
77
|
const id = ctx.request.body._id
|
|
78
78
|
const { row } = await handleRequest(DataSourceOperation.DELETE, tableId, {
|
|
79
|
-
id,
|
|
79
|
+
id: breakRowIdField(id),
|
|
80
80
|
})
|
|
81
81
|
return { response: { ok: true }, row }
|
|
82
82
|
}
|
|
@@ -121,8 +121,6 @@ read.push(new Endpoint("get", "/applications/:appId", controller.read))
|
|
|
121
121
|
* description: Based on application properties (currently only name) search for applications.
|
|
122
122
|
* tags:
|
|
123
123
|
* - applications
|
|
124
|
-
* parameters:
|
|
125
|
-
* - $ref: '#/components/parameters/appId'
|
|
126
124
|
* requestBody:
|
|
127
125
|
* required: true
|
|
128
126
|
* content:
|
|
@@ -135,14 +133,7 @@ read.push(new Endpoint("get", "/applications/:appId", controller.read))
|
|
|
135
133
|
* content:
|
|
136
134
|
* application/json:
|
|
137
135
|
* schema:
|
|
138
|
-
*
|
|
139
|
-
* required:
|
|
140
|
-
* - data
|
|
141
|
-
* properties:
|
|
142
|
-
* data:
|
|
143
|
-
* type: array
|
|
144
|
-
* items:
|
|
145
|
-
* $ref: '#/components/schemas/application'
|
|
136
|
+
* $ref: '#/components/schemas/applicationSearch'
|
|
146
137
|
* examples:
|
|
147
138
|
* applications:
|
|
148
139
|
* $ref: '#/components/examples/applications'
|
|
@@ -60,14 +60,7 @@ write.push(new Endpoint("post", "/queries/:queryId", controller.execute))
|
|
|
60
60
|
* content:
|
|
61
61
|
* application/json:
|
|
62
62
|
* schema:
|
|
63
|
-
*
|
|
64
|
-
* required:
|
|
65
|
-
* - data
|
|
66
|
-
* properties:
|
|
67
|
-
* data:
|
|
68
|
-
* type: array
|
|
69
|
-
* items:
|
|
70
|
-
* $ref: '#/components/schemas/query'
|
|
63
|
+
* $ref: '#/components/schemas/querySearch'
|
|
71
64
|
* examples:
|
|
72
65
|
* queries:
|
|
73
66
|
* $ref: '#/components/examples/queries'
|
|
@@ -148,14 +148,7 @@ read.push(new Endpoint("get", "/tables/:tableId", controller.read))
|
|
|
148
148
|
* content:
|
|
149
149
|
* application/json:
|
|
150
150
|
* schema:
|
|
151
|
-
*
|
|
152
|
-
* required:
|
|
153
|
-
* - data
|
|
154
|
-
* properties:
|
|
155
|
-
* data:
|
|
156
|
-
* type: array
|
|
157
|
-
* items:
|
|
158
|
-
* $ref: '#/components/schemas/table'
|
|
151
|
+
* $ref: '#/components/schemas/tableSearch'
|
|
159
152
|
* examples:
|
|
160
153
|
* tables:
|
|
161
154
|
* $ref: '#/components/examples/tables'
|
|
@@ -123,14 +123,7 @@ read.push(new Endpoint("get", "/users/:userId", controller.read))
|
|
|
123
123
|
* content:
|
|
124
124
|
* application/json:
|
|
125
125
|
* schema:
|
|
126
|
-
*
|
|
127
|
-
* required:
|
|
128
|
-
* - data
|
|
129
|
-
* properties:
|
|
130
|
-
* data:
|
|
131
|
-
* type: array
|
|
132
|
-
* items:
|
|
133
|
-
* $ref: '#/components/schemas/user'
|
|
126
|
+
* $ref: '#/components/schemas/userSearch'
|
|
134
127
|
* examples:
|
|
135
128
|
* users:
|
|
136
129
|
* $ref: '#/components/examples/users'
|