quickbase-js 1.1.0-beta.1 → 1.1.0-beta.3

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "quickbase-js",
3
3
  "main": "dist/quickbase.js",
4
4
  "types": "dist/quickbase.d.ts",
5
- "version": "1.1.0-beta.1",
5
+ "version": "1.1.0-beta.3",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -308,9 +308,18 @@ export const definitions = {
308
308
  type: "object",
309
309
  properties: {
310
310
  value: {
311
- type: ["string", "number", "boolean", "object", "array", "null"],
311
+ anyOf: [
312
+ { type: "string" },
313
+ { type: "number" },
314
+ { type: "boolean" },
315
+ { type: "object" },
316
+ { type: "array" },
317
+ { type: "null" },
318
+ ],
319
+ description: "The value of the field.",
312
320
  },
313
321
  },
322
+ required: ["value"],
314
323
  description: "The value object for a field ID key.",
315
324
  },
316
325
  description:
@@ -346,7 +355,20 @@ export const definitions = {
346
355
  type: "object",
347
356
  additionalProperties: {
348
357
  type: "object",
349
- properties: { value: { type: "any" } },
358
+ properties: {
359
+ value: {
360
+ anyOf: [
361
+ { type: "string" },
362
+ { type: "number" },
363
+ { type: "boolean" },
364
+ { type: "object" },
365
+ { type: "array" },
366
+ { type: "null" },
367
+ ],
368
+ description: "The value of the field.",
369
+ },
370
+ },
371
+ required: ["value"],
350
372
  },
351
373
  },
352
374
  description: "Array of upserted records with field IDs and values.",
@@ -387,7 +409,20 @@ export const definitions = {
387
409
  type: "object",
388
410
  additionalProperties: {
389
411
  type: "object",
390
- properties: { value: { type: "any" } },
412
+ properties: {
413
+ value: {
414
+ anyOf: [
415
+ { type: "string" },
416
+ { type: "number" },
417
+ { type: "boolean" },
418
+ { type: "object" },
419
+ { type: "array" },
420
+ { type: "null" },
421
+ ],
422
+ description: "The value of the field.",
423
+ },
424
+ },
425
+ required: ["value"],
391
426
  },
392
427
  },
393
428
  description: "Array of successfully upserted records (may be empty).",
@@ -540,4 +575,235 @@ export const definitions = {
540
575
  },
541
576
  },
542
577
  },
578
+ GetRelationships200Response: {
579
+ type: "object",
580
+ properties: {
581
+ metadata: {
582
+ type: "object",
583
+ properties: {
584
+ numRelationships: {
585
+ type: "integer",
586
+ description:
587
+ "The number of relationships in the current response object.",
588
+ },
589
+ skip: {
590
+ type: "integer",
591
+ description: "The number of relationships skipped.",
592
+ },
593
+ totalRelationships: {
594
+ type: "integer",
595
+ description: "The total number of relationships.",
596
+ },
597
+ },
598
+ required: ["numRelationships", "skip", "totalRelationships"],
599
+ description:
600
+ "Additional information about the results that may be helpful.",
601
+ },
602
+ relationships: {
603
+ type: "array",
604
+ items: { $ref: "#/definitions/Relationship" },
605
+ description: "The relationships in a table.",
606
+ },
607
+ },
608
+ required: ["metadata", "relationships"],
609
+ description: "Response containing relationships for a table.",
610
+ },
611
+ Relationship: {
612
+ type: "object",
613
+ properties: {
614
+ id: {
615
+ type: "integer",
616
+ description: "The relationship id (foreign key field id).",
617
+ },
618
+ parentTableId: {
619
+ type: "string",
620
+ description: "The parent table id of the relationship.",
621
+ },
622
+ childTableId: {
623
+ type: "string",
624
+ description: "The child table id of the relationship.",
625
+ },
626
+ foreignKeyField: {
627
+ $ref: "#/definitions/RelationshipField",
628
+ description: "The foreign key field information.",
629
+ },
630
+ isCrossApp: {
631
+ type: "boolean",
632
+ description: "Whether this is a cross-app relationship.",
633
+ },
634
+ lookupFields: {
635
+ type: "array",
636
+ items: { $ref: "#/definitions/RelationshipField" },
637
+ description: "The lookup fields array.",
638
+ },
639
+ summaryFields: {
640
+ type: "array",
641
+ items: { $ref: "#/definitions/RelationshipField" },
642
+ description: "The summary fields array.",
643
+ },
644
+ },
645
+ required: [
646
+ "id",
647
+ "parentTableId",
648
+ "childTableId",
649
+ "foreignKeyField",
650
+ "isCrossApp",
651
+ ],
652
+ description: "A relationship between tables.",
653
+ },
654
+ RelationshipField: {
655
+ type: "object",
656
+ properties: {
657
+ id: {
658
+ type: "integer",
659
+ description: "Field id.",
660
+ },
661
+ label: {
662
+ type: "string",
663
+ description: "Field label.",
664
+ },
665
+ type: {
666
+ type: "string",
667
+ description: "Field type.",
668
+ },
669
+ },
670
+ required: ["id", "label", "type"],
671
+ description:
672
+ "A field involved in a relationship (foreign key, lookup, or summary).",
673
+ },
674
+ CopyAppRequest: {
675
+ type: "object",
676
+ required: ["name"],
677
+ properties: {
678
+ name: {
679
+ type: "string",
680
+ description: "The name of the newly copied app.",
681
+ },
682
+ description: {
683
+ type: "string",
684
+ description: "The description of the newly copied app.",
685
+ },
686
+ properties: {
687
+ type: "object",
688
+ properties: {
689
+ keepData: {
690
+ type: "boolean",
691
+ description:
692
+ "Whether to copy the app's data along with the schema.",
693
+ },
694
+ excludeFiles: {
695
+ type: "boolean",
696
+ description:
697
+ "If keepData is true, whether to copy file attachments. Ignored if keepData is false.",
698
+ },
699
+ usersAndRoles: {
700
+ type: "boolean",
701
+ description:
702
+ "If true, users will be copied along with their assigned roles. If false, users and roles will be copied but roles will not be assigned.",
703
+ },
704
+ assignUserToken: {
705
+ type: "boolean",
706
+ description:
707
+ "Whether to add the user token used to make this request to the new app.",
708
+ },
709
+ },
710
+ description:
711
+ "The configuration properties for performing the app copy.",
712
+ },
713
+ },
714
+ description: "Request body for copying an existing application.",
715
+ },
716
+ CopyApp200Response: {
717
+ type: "object",
718
+ required: ["id", "name"],
719
+ properties: {
720
+ id: {
721
+ type: "string",
722
+ description: "The unique identifier for the copied application.",
723
+ },
724
+ name: {
725
+ type: "string",
726
+ description:
727
+ "The app name. Multiple apps with the same name are allowed in the same realm.",
728
+ },
729
+ description: {
730
+ type: "string",
731
+ description: "The description for the app.",
732
+ },
733
+ created: {
734
+ type: "string",
735
+ format: "date-time",
736
+ description: "The time and date the app was created (ISO 8601, UTC).",
737
+ },
738
+ updated: {
739
+ type: "string",
740
+ format: "date-time",
741
+ description:
742
+ "The time and date the app was last updated (ISO 8601, UTC).",
743
+ },
744
+ dateFormat: {
745
+ type: "string",
746
+ description:
747
+ "The format used for displaying dates in the app (e.g., MM-DD-YYYY).",
748
+ },
749
+ timeZone: {
750
+ type: "string",
751
+ description:
752
+ "The time zone used for displaying time values (e.g., (UTC-08:00) Pacific Time).",
753
+ },
754
+ hasEveryoneOnTheInternet: {
755
+ type: "boolean",
756
+ description:
757
+ "Indicates if the app includes Everyone On The Internet access.",
758
+ },
759
+ variables: {
760
+ type: "array",
761
+ items: {
762
+ type: "object",
763
+ properties: {
764
+ name: { type: "string" },
765
+ value: { type: "string" },
766
+ },
767
+ required: ["name", "value"],
768
+ },
769
+ description: "The app variables.",
770
+ },
771
+ ancestorId: {
772
+ type: "string",
773
+ description: "The id of the app from which this app was copied.",
774
+ },
775
+ dataClassification: {
776
+ type: "string",
777
+ description:
778
+ "The Data Classification label assigned to the app (optional, may be 'None').",
779
+ },
780
+ },
781
+ description: "Response body for successful app copy operation.",
782
+ },
783
+ DeleteAppRequest: {
784
+ // New definition for deleteApp request
785
+ type: "object",
786
+ required: ["name"],
787
+ properties: {
788
+ name: {
789
+ type: "string",
790
+ description:
791
+ "The name of the application to delete, required for confirmation.",
792
+ },
793
+ },
794
+ description:
795
+ "Request body for deleting an application, requiring the app name for confirmation.",
796
+ },
797
+ DeleteApp200Response: {
798
+ // New definition for deleteApp response
799
+ type: "object",
800
+ properties: {
801
+ deletedAppId: {
802
+ type: "string",
803
+ description: "The ID of the deleted application.",
804
+ },
805
+ },
806
+ required: ["deletedAppId"],
807
+ description: "Response body for successful deletion of an application.",
808
+ },
543
809
  };
@@ -42,6 +42,61 @@ export const paths = {
42
42
  },
43
43
  },
44
44
  },
45
+ delete: {
46
+ // New DELETE method for deleteApp
47
+ operationId: "deleteApp",
48
+ summary: "Delete an application by ID",
49
+ tags: ["Apps"],
50
+ parameters: [
51
+ {
52
+ name: "appId",
53
+ in: "path",
54
+ required: true,
55
+ type: "string",
56
+ description: "The unique identifier of the app to delete.",
57
+ },
58
+ {
59
+ name: "body",
60
+ in: "body",
61
+ required: true,
62
+ schema: { $ref: "#/definitions/DeleteAppRequest" },
63
+ },
64
+ ],
65
+ responses: {
66
+ 200: {
67
+ description: "Success - application deleted",
68
+ schema: { $ref: "#/definitions/DeleteApp200Response" },
69
+ },
70
+ },
71
+ },
72
+ },
73
+ "/apps/{appId}/copy": {
74
+ post: {
75
+ operationId: "copyApp",
76
+ summary: "Copy an existing application",
77
+ tags: ["Apps"],
78
+ parameters: [
79
+ {
80
+ name: "appId",
81
+ in: "path",
82
+ required: true,
83
+ type: "string",
84
+ description: "The unique identifier of the app to copy.",
85
+ },
86
+ {
87
+ name: "body",
88
+ in: "body",
89
+ required: true,
90
+ schema: { $ref: "#/definitions/CopyAppRequest" },
91
+ },
92
+ ],
93
+ responses: {
94
+ 200: {
95
+ description: "Success - application copied",
96
+ schema: { $ref: "#/definitions/CopyApp200Response" },
97
+ },
98
+ },
99
+ },
45
100
  },
46
101
  "/fields": {
47
102
  get: {
@@ -234,6 +289,35 @@ export const paths = {
234
289
  },
235
290
  },
236
291
  },
292
+ "/tables/{tableId}/relationships": {
293
+ get: {
294
+ operationId: "getRelationships",
295
+ summary: "Get relationships for a table",
296
+ tags: ["Relationships"],
297
+ parameters: [
298
+ {
299
+ name: "tableId",
300
+ in: "path",
301
+ required: true,
302
+ type: "string",
303
+ description: "The unique identifier (dbid) of the child table.",
304
+ },
305
+ {
306
+ name: "skip",
307
+ in: "query",
308
+ required: false,
309
+ type: "integer",
310
+ description: "The number of relationships to skip.",
311
+ },
312
+ ],
313
+ responses: {
314
+ 200: {
315
+ description: "Success - relationships retrieved",
316
+ schema: { $ref: "#/definitions/GetRelationships200Response" },
317
+ },
318
+ },
319
+ },
320
+ },
237
321
  "/records": {
238
322
  post: {
239
323
  operationId: "upsert",