@epilot/entity-client 3.0.3 → 3.0.6

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/openapi.d.ts CHANGED
@@ -1023,6 +1023,16 @@ declare namespace Components {
1023
1023
  * Contacts
1024
1024
  */
1025
1025
  plural: string;
1026
+ /**
1027
+ * example:
1028
+ * false
1029
+ */
1030
+ published?: boolean;
1031
+ /**
1032
+ * example:
1033
+ * false
1034
+ */
1035
+ draft?: boolean;
1026
1036
  /**
1027
1037
  * example:
1028
1038
  * person
@@ -1150,6 +1160,12 @@ declare namespace Components {
1150
1160
  */
1151
1161
  export interface EntitySchemaItem {
1152
1162
  id?: /* Generated uuid for schema */ SchemaId /* uuid */;
1163
+ created_at?: string;
1164
+ updated_at?: string;
1165
+ source?: {
1166
+ id?: string;
1167
+ type?: string;
1168
+ };
1153
1169
  slug: /**
1154
1170
  * URL-friendly identifier for the entity schema
1155
1171
  * example:
@@ -1179,6 +1195,16 @@ declare namespace Components {
1179
1195
  * Contacts
1180
1196
  */
1181
1197
  plural: string;
1198
+ /**
1199
+ * example:
1200
+ * false
1201
+ */
1202
+ published?: boolean;
1203
+ /**
1204
+ * example:
1205
+ * false
1206
+ */
1207
+ draft?: boolean;
1182
1208
  /**
1183
1209
  * example:
1184
1210
  * person
@@ -2057,7 +2083,7 @@ declare namespace Components {
2057
2083
  */
2058
2084
  protected?: boolean;
2059
2085
  type?: "relation";
2060
- relation_type?: "belongs_to" | "has_many";
2086
+ relation_type?: "has_many" | "has_one";
2061
2087
  delete_mode?: "cascade";
2062
2088
  relation_affinity_mode?: "weak" | "strong";
2063
2089
  /**
@@ -2190,7 +2216,7 @@ declare namespace Components {
2190
2216
  repeatable?: boolean;
2191
2217
  has_primary?: boolean;
2192
2218
  relation_affinity_mode?: "weak" | "strong";
2193
- type?: "string" | "phone" | "email" | "address" | "relation";
2219
+ type?: "string" | "phone" | "email" | "address" | "relation" | "payment";
2194
2220
  /**
2195
2221
  * when enable_relation_picker is set to true the user will be able to pick existing relations as values. Otherwise, the user will need to create new relation to link.
2196
2222
  */
@@ -2293,6 +2319,10 @@ declare namespace Components {
2293
2319
  value: string;
2294
2320
  title?: string;
2295
2321
  })[];
2322
+ /**
2323
+ * Allow arbitrary input values in addition to provided options
2324
+ */
2325
+ allow_any?: boolean;
2296
2326
  }
2297
2327
  /**
2298
2328
  * Summary Fields are displayed inside list view as a resume of the relation entity.
@@ -2660,6 +2690,27 @@ declare namespace Paths {
2660
2690
  Components.Schemas.EntityItem;
2661
2691
  }
2662
2692
  }
2693
+ namespace CreateNewSchemaVersion {
2694
+ namespace Parameters {
2695
+ export type Draft = boolean;
2696
+ export type Slug = /**
2697
+ * URL-friendly identifier for the entity schema
2698
+ * example:
2699
+ * contact
2700
+ */
2701
+ Components.Schemas.EntitySlug;
2702
+ }
2703
+ export interface PathParameters {
2704
+ slug: Parameters.Slug;
2705
+ }
2706
+ export interface QueryParameters {
2707
+ draft?: Parameters.Draft;
2708
+ }
2709
+ export type RequestBody = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchema;
2710
+ namespace Responses {
2711
+ export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
2712
+ }
2713
+ }
2663
2714
  namespace DeleteEntity {
2664
2715
  namespace Parameters {
2665
2716
  export type ActivityId = /**
@@ -2711,9 +2762,9 @@ declare namespace Paths {
2711
2762
  }
2712
2763
  }
2713
2764
  }
2714
- namespace DeleteSchema {
2765
+ namespace DeleteSchemaById {
2715
2766
  namespace Parameters {
2716
- export type Id = string;
2767
+ export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
2717
2768
  export type Slug = /**
2718
2769
  * URL-friendly identifier for the entity schema
2719
2770
  * example:
@@ -2725,7 +2776,7 @@ declare namespace Paths {
2725
2776
  slug: Parameters.Slug;
2726
2777
  }
2727
2778
  export interface QueryParameters {
2728
- id?: Parameters.Id;
2779
+ id: Parameters.Id;
2729
2780
  }
2730
2781
  namespace Responses {
2731
2782
  export interface $204 {
@@ -2870,7 +2921,7 @@ declare namespace Paths {
2870
2921
  }
2871
2922
  namespace GetSchema {
2872
2923
  namespace Parameters {
2873
- export type Id = string;
2924
+ export type Id = /* Generated uuid for schema */ Components.Schemas.SchemaId /* uuid */;
2874
2925
  export type Slug = /**
2875
2926
  * URL-friendly identifier for the entity schema
2876
2927
  * example:
@@ -2902,36 +2953,29 @@ declare namespace Paths {
2902
2953
  }
2903
2954
  namespace Responses {
2904
2955
  export interface $200 {
2905
- results?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
2956
+ versions?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
2957
+ drafts?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
2906
2958
  }
2907
2959
  }
2908
2960
  }
2909
- namespace ListSchemas {
2961
+ namespace ListSchemaBlueprints {
2910
2962
  namespace Responses {
2911
2963
  export interface $200 {
2912
2964
  results?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
2913
2965
  }
2914
2966
  }
2915
2967
  }
2916
- namespace PutSchema {
2968
+ namespace ListSchemas {
2917
2969
  namespace Parameters {
2918
- export type Draft = boolean;
2919
- export type Slug = /**
2920
- * URL-friendly identifier for the entity schema
2921
- * example:
2922
- * contact
2923
- */
2924
- Components.Schemas.EntitySlug;
2925
- }
2926
- export interface PathParameters {
2927
- slug: Parameters.Slug;
2970
+ export type Unpublished = boolean;
2928
2971
  }
2929
2972
  export interface QueryParameters {
2930
- draft?: Parameters.Draft;
2973
+ unpublished?: Parameters.Unpublished;
2931
2974
  }
2932
- export type RequestBody = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchema;
2933
2975
  namespace Responses {
2934
- export type $200 = /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem;
2976
+ export interface $200 {
2977
+ results?: /* The "type" of an Entity. Describes the shape. Includes Entity Attributes, Relations and Capabilities. */ Components.Schemas.EntitySchemaItem[];
2978
+ }
2935
2979
  }
2936
2980
  }
2937
2981
  namespace SearchEntities {
@@ -3078,16 +3122,28 @@ declare namespace Paths {
3078
3122
  export interface OperationMethods {
3079
3123
  /**
3080
3124
  * listSchemas - listSchemas
3125
+ *
3126
+ * Get the latest version of local schema
3081
3127
  */
3082
3128
  'listSchemas'(
3083
- parameters?: Parameters<UnknownParamsObject> | null,
3129
+ parameters?: Parameters<Paths.ListSchemas.QueryParameters> | null,
3084
3130
  data?: any,
3085
3131
  config?: AxiosRequestConfig
3086
3132
  ): OperationResponse<Paths.ListSchemas.Responses.$200>
3133
+ /**
3134
+ * listSchemaBlueprints - listSchemaBlueprints
3135
+ *
3136
+ * List canonical versions of all available schemas
3137
+ */
3138
+ 'listSchemaBlueprints'(
3139
+ parameters?: Parameters<UnknownParamsObject> | null,
3140
+ data?: any,
3141
+ config?: AxiosRequestConfig
3142
+ ): OperationResponse<Paths.ListSchemaBlueprints.Responses.$200>
3087
3143
  /**
3088
3144
  * getSchemaVersions - getSchemaVersions
3089
3145
  *
3090
- * Get all versions of this schema
3146
+ * Get all versions of this schema ordered by the latest versions including drafts.
3091
3147
  */
3092
3148
  'getSchemaVersions'(
3093
3149
  parameters?: Parameters<Paths.GetSchemaVersions.PathParameters> | null,
@@ -3096,6 +3152,8 @@ export interface OperationMethods {
3096
3152
  ): OperationResponse<Paths.GetSchemaVersions.Responses.$200>
3097
3153
  /**
3098
3154
  * getSchema - getSchema
3155
+ *
3156
+ * By default gets the latest version of the Schema and to get the specific version of schema pass the id.
3099
3157
  */
3100
3158
  'getSchema'(
3101
3159
  parameters?: Parameters<Paths.GetSchema.PathParameters & Paths.GetSchema.QueryParameters> | null,
@@ -3103,23 +3161,25 @@ export interface OperationMethods {
3103
3161
  config?: AxiosRequestConfig
3104
3162
  ): OperationResponse<Paths.GetSchema.Responses.$200>
3105
3163
  /**
3106
- * putSchema - putSchema
3164
+ * createNewSchemaVersion - createNewSchemaVersion
3107
3165
  *
3108
- * Create new version of the schema
3166
+ * Create new version of the schema and default draft is false.
3109
3167
  */
3110
- 'putSchema'(
3111
- parameters?: Parameters<Paths.PutSchema.PathParameters & Paths.PutSchema.QueryParameters> | null,
3112
- data?: Paths.PutSchema.RequestBody,
3168
+ 'createNewSchemaVersion'(
3169
+ parameters?: Parameters<Paths.CreateNewSchemaVersion.PathParameters & Paths.CreateNewSchemaVersion.QueryParameters> | null,
3170
+ data?: Paths.CreateNewSchemaVersion.RequestBody,
3113
3171
  config?: AxiosRequestConfig
3114
- ): OperationResponse<Paths.PutSchema.Responses.$200>
3172
+ ): OperationResponse<Paths.CreateNewSchemaVersion.Responses.$200>
3115
3173
  /**
3116
- * deleteSchema - deleteSchema
3174
+ * deleteSchemaById - deleteSchemaById
3175
+ *
3176
+ * Delete schema by Id
3117
3177
  */
3118
- 'deleteSchema'(
3119
- parameters?: Parameters<Paths.DeleteSchema.PathParameters & Paths.DeleteSchema.QueryParameters> | null,
3178
+ 'deleteSchemaById'(
3179
+ parameters?: Parameters<Paths.DeleteSchemaById.PathParameters & Paths.DeleteSchemaById.QueryParameters> | null,
3120
3180
  data?: any,
3121
3181
  config?: AxiosRequestConfig
3122
- ): OperationResponse<Paths.DeleteSchema.Responses.$204>
3182
+ ): OperationResponse<Paths.DeleteSchemaById.Responses.$204>
3123
3183
  /**
3124
3184
  * searchEntities - searchEntities
3125
3185
  *
@@ -3434,18 +3494,32 @@ export interface PathsDictionary {
3434
3494
  ['/v1/entity/schemas']: {
3435
3495
  /**
3436
3496
  * listSchemas - listSchemas
3497
+ *
3498
+ * Get the latest version of local schema
3437
3499
  */
3438
3500
  'get'(
3439
- parameters?: Parameters<UnknownParamsObject> | null,
3501
+ parameters?: Parameters<Paths.ListSchemas.QueryParameters> | null,
3440
3502
  data?: any,
3441
3503
  config?: AxiosRequestConfig
3442
3504
  ): OperationResponse<Paths.ListSchemas.Responses.$200>
3443
3505
  }
3506
+ ['/v1/entity/schemas/blueprints']: {
3507
+ /**
3508
+ * listSchemaBlueprints - listSchemaBlueprints
3509
+ *
3510
+ * List canonical versions of all available schemas
3511
+ */
3512
+ 'get'(
3513
+ parameters?: Parameters<UnknownParamsObject> | null,
3514
+ data?: any,
3515
+ config?: AxiosRequestConfig
3516
+ ): OperationResponse<Paths.ListSchemaBlueprints.Responses.$200>
3517
+ }
3444
3518
  ['/v1/entity/schemas/{slug}/versions']: {
3445
3519
  /**
3446
3520
  * getSchemaVersions - getSchemaVersions
3447
3521
  *
3448
- * Get all versions of this schema
3522
+ * Get all versions of this schema ordered by the latest versions including drafts.
3449
3523
  */
3450
3524
  'get'(
3451
3525
  parameters?: Parameters<Paths.GetSchemaVersions.PathParameters> | null,
@@ -3456,6 +3530,8 @@ export interface PathsDictionary {
3456
3530
  ['/v1/entity/schemas/{slug}']: {
3457
3531
  /**
3458
3532
  * getSchema - getSchema
3533
+ *
3534
+ * By default gets the latest version of the Schema and to get the specific version of schema pass the id.
3459
3535
  */
3460
3536
  'get'(
3461
3537
  parameters?: Parameters<Paths.GetSchema.PathParameters & Paths.GetSchema.QueryParameters> | null,
@@ -3463,23 +3539,25 @@ export interface PathsDictionary {
3463
3539
  config?: AxiosRequestConfig
3464
3540
  ): OperationResponse<Paths.GetSchema.Responses.$200>
3465
3541
  /**
3466
- * putSchema - putSchema
3542
+ * createNewSchemaVersion - createNewSchemaVersion
3467
3543
  *
3468
- * Create new version of the schema
3544
+ * Create new version of the schema and default draft is false.
3469
3545
  */
3470
3546
  'put'(
3471
- parameters?: Parameters<Paths.PutSchema.PathParameters & Paths.PutSchema.QueryParameters> | null,
3472
- data?: Paths.PutSchema.RequestBody,
3547
+ parameters?: Parameters<Paths.CreateNewSchemaVersion.PathParameters & Paths.CreateNewSchemaVersion.QueryParameters> | null,
3548
+ data?: Paths.CreateNewSchemaVersion.RequestBody,
3473
3549
  config?: AxiosRequestConfig
3474
- ): OperationResponse<Paths.PutSchema.Responses.$200>
3550
+ ): OperationResponse<Paths.CreateNewSchemaVersion.Responses.$200>
3475
3551
  /**
3476
- * deleteSchema - deleteSchema
3552
+ * deleteSchemaById - deleteSchemaById
3553
+ *
3554
+ * Delete schema by Id
3477
3555
  */
3478
3556
  'delete'(
3479
- parameters?: Parameters<Paths.DeleteSchema.PathParameters & Paths.DeleteSchema.QueryParameters> | null,
3557
+ parameters?: Parameters<Paths.DeleteSchemaById.PathParameters & Paths.DeleteSchemaById.QueryParameters> | null,
3480
3558
  data?: any,
3481
3559
  config?: AxiosRequestConfig
3482
- ): OperationResponse<Paths.DeleteSchema.Responses.$204>
3560
+ ): OperationResponse<Paths.DeleteSchemaById.Responses.$204>
3483
3561
  }
3484
3562
  ['/v1/entity:search']: {
3485
3563
  /**
package/dist/openapi.json CHANGED
@@ -32,6 +32,48 @@
32
32
  "get": {
33
33
  "operationId": "listSchemas",
34
34
  "summary": "listSchemas",
35
+ "description": "Get the latest version of local schema",
36
+ "parameters": [
37
+ {
38
+ "in": "query",
39
+ "name": "unpublished",
40
+ "description": "Includes the unpublished version of unpublished schema",
41
+ "schema": {
42
+ "type": "boolean",
43
+ "default": false
44
+ }
45
+ }
46
+ ],
47
+ "tags": [
48
+ "Schemas"
49
+ ],
50
+ "responses": {
51
+ "200": {
52
+ "description": "Success",
53
+ "content": {
54
+ "application/json": {
55
+ "schema": {
56
+ "type": "object",
57
+ "properties": {
58
+ "results": {
59
+ "type": "array",
60
+ "items": {
61
+ "$ref": "#/components/schemas/EntitySchemaItem"
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "/v1/entity/schemas/blueprints": {
73
+ "get": {
74
+ "operationId": "listSchemaBlueprints",
75
+ "summary": "listSchemaBlueprints",
76
+ "description": "List canonical versions of all available schemas",
35
77
  "tags": [
36
78
  "Schemas"
37
79
  ],
@@ -61,7 +103,7 @@
61
103
  "get": {
62
104
  "operationId": "getSchemaVersions",
63
105
  "summary": "getSchemaVersions",
64
- "description": "Get all versions of this schema",
106
+ "description": "Get all versions of this schema ordered by the latest versions including drafts.",
65
107
  "tags": [
66
108
  "Schemas"
67
109
  ],
@@ -83,7 +125,13 @@
83
125
  "schema": {
84
126
  "type": "object",
85
127
  "properties": {
86
- "results": {
128
+ "versions": {
129
+ "type": "array",
130
+ "items": {
131
+ "$ref": "#/components/schemas/EntitySchemaItem"
132
+ }
133
+ },
134
+ "drafts": {
87
135
  "type": "array",
88
136
  "items": {
89
137
  "$ref": "#/components/schemas/EntitySchemaItem"
@@ -101,6 +149,7 @@
101
149
  "get": {
102
150
  "operationId": "getSchema",
103
151
  "summary": "getSchema",
152
+ "description": "By default gets the latest version of the Schema and to get the specific version of schema pass the id.",
104
153
  "tags": [
105
154
  "Schemas"
106
155
  ],
@@ -117,7 +166,7 @@
117
166
  "in": "query",
118
167
  "name": "id",
119
168
  "schema": {
120
- "type": "string"
169
+ "$ref": "#/components/schemas/SchemaId"
121
170
  }
122
171
  }
123
172
  ],
@@ -135,9 +184,9 @@
135
184
  }
136
185
  },
137
186
  "put": {
138
- "operationId": "putSchema",
139
- "summary": "putSchema",
140
- "description": "Create new version of the schema",
187
+ "operationId": "createNewSchemaVersion",
188
+ "summary": "createNewSchemaVersion",
189
+ "description": "Create new version of the schema and default draft is false.",
141
190
  "tags": [
142
191
  "Schemas"
143
192
  ],
@@ -182,8 +231,9 @@
182
231
  }
183
232
  },
184
233
  "delete": {
185
- "operationId": "deleteSchema",
186
- "summary": "deleteSchema",
234
+ "operationId": "deleteSchemaById",
235
+ "summary": "deleteSchemaById",
236
+ "description": "Delete schema by Id",
187
237
  "tags": [
188
238
  "Schemas"
189
239
  ],
@@ -199,8 +249,9 @@
199
249
  {
200
250
  "in": "query",
201
251
  "name": "id",
252
+ "required": true,
202
253
  "schema": {
203
- "type": "string"
254
+ "$ref": "#/components/schemas/SchemaId"
204
255
  }
205
256
  }
206
257
  ],
@@ -238,7 +289,7 @@
238
289
  }
239
290
  },
240
291
  "text/csv": {
241
- "schemas": {
292
+ "schema": {
242
293
  "type": "string"
243
294
  }
244
295
  }
@@ -1238,6 +1289,14 @@
1238
1289
  "type": "string",
1239
1290
  "example": "Contacts"
1240
1291
  },
1292
+ "published": {
1293
+ "type": "boolean",
1294
+ "example": false
1295
+ },
1296
+ "draft": {
1297
+ "type": "boolean",
1298
+ "example": false
1299
+ },
1241
1300
  "icon": {
1242
1301
  "type": "string",
1243
1302
  "example": "person"
@@ -1416,6 +1475,23 @@
1416
1475
  "properties": {
1417
1476
  "id": {
1418
1477
  "$ref": "#/components/schemas/SchemaId"
1478
+ },
1479
+ "created_at": {
1480
+ "type": "string"
1481
+ },
1482
+ "updated_at": {
1483
+ "type": "string"
1484
+ },
1485
+ "source": {
1486
+ "type": "object",
1487
+ "properties": {
1488
+ "id": {
1489
+ "type": "string"
1490
+ },
1491
+ "type": {
1492
+ "type": "string"
1493
+ }
1494
+ }
1419
1495
  }
1420
1496
  }
1421
1497
  },
@@ -1751,6 +1827,10 @@
1751
1827
  }
1752
1828
  ]
1753
1829
  }
1830
+ },
1831
+ "allow_any": {
1832
+ "type": "boolean",
1833
+ "description": "Allow arbitrary input values in addition to provided options"
1754
1834
  }
1755
1835
  }
1756
1836
  }
@@ -1889,8 +1969,8 @@
1889
1969
  "relation_type": {
1890
1970
  "type": "string",
1891
1971
  "enum": [
1892
- "belongs_to",
1893
- "has_many"
1972
+ "has_many",
1973
+ "has_one"
1894
1974
  ]
1895
1975
  },
1896
1976
  "delete_mode": {
@@ -2034,7 +2114,8 @@
2034
2114
  "phone",
2035
2115
  "email",
2036
2116
  "address",
2037
- "relation"
2117
+ "relation",
2118
+ "payment"
2038
2119
  ]
2039
2120
  },
2040
2121
  "enable_relation_picker": {