@unito/integration-api 5.0.0 → 6.0.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/dist/src/index.cjs +1 -0
- package/dist/src/types.d.ts +48 -12
- package/dist/src/types.js +1 -0
- package/package.json +1 -1
package/dist/src/index.cjs
CHANGED
package/dist/src/types.d.ts
CHANGED
|
@@ -98,28 +98,63 @@ interface AbstractFieldSchema {
|
|
|
98
98
|
*/
|
|
99
99
|
nullable?: boolean;
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
type BasicFieldValueType = Exclude<FieldValueType, typeof FieldValueTypes.BLOB | typeof FieldValueTypes.REFERENCE | typeof FieldValueTypes.OBJECT | typeof FieldValueTypes.DATETIME_RANGE | typeof FieldValueTypes.DATE_RANGE>;
|
|
102
|
+
/**
|
|
103
|
+
* Semantic-constrained BasicFieldSchema variants.
|
|
104
|
+
* Each semantic restricts which field types are valid, matching the runtime
|
|
105
|
+
* validation in integrationDebugger's getSemanticSupportedFieldTypes().
|
|
106
|
+
*/
|
|
107
|
+
interface ProviderUrlFieldSchema extends AbstractFieldSchema {
|
|
108
|
+
semantic: typeof Semantics.PROVIDER_URL;
|
|
109
|
+
type: typeof FieldValueTypes.URL;
|
|
110
|
+
}
|
|
111
|
+
interface CreatedAtFieldSchema extends AbstractFieldSchema {
|
|
112
|
+
semantic: typeof Semantics.CREATED_AT;
|
|
113
|
+
type: typeof FieldValueTypes.DATETIME;
|
|
106
114
|
}
|
|
115
|
+
interface UpdatedAtFieldSchema extends AbstractFieldSchema {
|
|
116
|
+
semantic: typeof Semantics.UPDATED_AT;
|
|
117
|
+
type: typeof FieldValueTypes.DATETIME;
|
|
118
|
+
}
|
|
119
|
+
interface DescriptionFieldSchema extends AbstractFieldSchema {
|
|
120
|
+
semantic: typeof Semantics.DESCRIPTION;
|
|
121
|
+
type: typeof FieldValueTypes.RICH_TEXT_HTML | typeof FieldValueTypes.RICH_TEXT_MARKDOWN | typeof FieldValueTypes.STRING;
|
|
122
|
+
}
|
|
123
|
+
interface DisplayNameFieldSchema extends AbstractFieldSchema {
|
|
124
|
+
semantic: typeof Semantics.DISPLAY_NAME;
|
|
125
|
+
type: typeof FieldValueTypes.STRING | typeof FieldValueTypes.EMAIL;
|
|
126
|
+
}
|
|
127
|
+
interface UnconstrainedBasicFieldSchema extends AbstractFieldSchema {
|
|
128
|
+
semantic?: never;
|
|
129
|
+
type: BasicFieldValueType;
|
|
130
|
+
}
|
|
131
|
+
export type BasicFieldSchema = ProviderUrlFieldSchema | CreatedAtFieldSchema | UpdatedAtFieldSchema | DescriptionFieldSchema | DisplayNameFieldSchema | UnconstrainedBasicFieldSchema;
|
|
107
132
|
export interface BlobFieldSchema extends AbstractFieldSchema {
|
|
108
133
|
/**
|
|
109
134
|
* The type of the field.
|
|
110
135
|
*/
|
|
111
136
|
type: typeof FieldValueTypes.BLOB;
|
|
112
137
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Semantic-constrained ReferenceFieldSchema variants.
|
|
140
|
+
* USER and PARENT semantics must use REFERENCE type.
|
|
141
|
+
*/
|
|
142
|
+
interface UserReferenceFieldSchema extends AbstractFieldSchema {
|
|
143
|
+
semantic: typeof Semantics.USER;
|
|
144
|
+
type: typeof FieldValueTypes.REFERENCE;
|
|
145
|
+
reference: ReferenceRelation;
|
|
146
|
+
}
|
|
147
|
+
interface ParentReferenceFieldSchema extends AbstractFieldSchema {
|
|
148
|
+
semantic: typeof Semantics.PARENT;
|
|
149
|
+
type: typeof FieldValueTypes.REFERENCE;
|
|
150
|
+
reference: ReferenceRelation;
|
|
151
|
+
}
|
|
152
|
+
interface UnconstrainedReferenceFieldSchema extends AbstractFieldSchema {
|
|
153
|
+
semantic?: never;
|
|
117
154
|
type: typeof FieldValueTypes.REFERENCE;
|
|
118
|
-
/**
|
|
119
|
-
* Describe the referenced collection.
|
|
120
|
-
*/
|
|
121
155
|
reference: ReferenceRelation;
|
|
122
156
|
}
|
|
157
|
+
export type ReferenceFieldSchema = UserReferenceFieldSchema | ParentReferenceFieldSchema | UnconstrainedReferenceFieldSchema;
|
|
123
158
|
/**
|
|
124
159
|
* A ReferenceRelation describes a relation that can be used in a ReferenceFieldSchema.
|
|
125
160
|
*/
|
|
@@ -471,6 +506,7 @@ export declare const StatusCodes: {
|
|
|
471
506
|
readonly NO_CONTENT: 204;
|
|
472
507
|
readonly BAD_REQUEST: 400;
|
|
473
508
|
readonly UNAUTHORIZED: 401;
|
|
509
|
+
readonly PAYMENT_REQUIRED: 402;
|
|
474
510
|
readonly FORBIDDEN: 403;
|
|
475
511
|
readonly NOT_FOUND: 404;
|
|
476
512
|
readonly NOT_ACCEPTABLE: 406;
|
package/dist/src/types.js
CHANGED