@versionone/agility-sdk 1.0.0-alpha.4 → 1.0.0-alpha.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/CHANGELOG.md +62 -6
- package/README.md +8 -6
- package/dist/index.cjs +101 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +169 -96
- package/dist/index.d.ts +169 -96
- package/dist/index.js +101 -15
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -75,7 +75,7 @@ interface RequestOptions {
|
|
|
75
75
|
/**
|
|
76
76
|
* Called with a successful response's status and headers before its body
|
|
77
77
|
* is read — for what the body alone does not say (an attachment's
|
|
78
|
-
* Content-Type,
|
|
78
|
+
* Content-Type, an ETag). A transport that cannot see headers may skip it.
|
|
79
79
|
*/
|
|
80
80
|
onResponse?: (response: {
|
|
81
81
|
status: number;
|
|
@@ -83,6 +83,12 @@ interface RequestOptions {
|
|
|
83
83
|
get(name: string): string | null;
|
|
84
84
|
};
|
|
85
85
|
}) => void;
|
|
86
|
+
/**
|
|
87
|
+
* The request is conditional (an If-None-Match header is set) and a
|
|
88
|
+
* 304 Not Modified is an answer, not a failure: the promise then resolves
|
|
89
|
+
* to undefined after onResponse has seen the 304 and its headers.
|
|
90
|
+
*/
|
|
91
|
+
acceptNotModified?: boolean;
|
|
86
92
|
}
|
|
87
93
|
interface Transport {
|
|
88
94
|
request<T>(options: RequestOptions): Promise<T>;
|
|
@@ -99,7 +105,9 @@ interface Transport {
|
|
|
99
105
|
* failure from an answer, but they are narrow on purpose: only requests the
|
|
100
106
|
* caller marks idempotent (every GET is; a POST to api/asset is not — a
|
|
101
107
|
* retried batch write after a timeout is a double write), and only on a
|
|
102
|
-
* network error
|
|
108
|
+
* network error, a 5xx, or a 429 (the instance throttles per token; it
|
|
109
|
+
* sends no Retry-After, but one is honoured when present, up to 30 s). Any
|
|
110
|
+
* other 4xx is an answer and is never retried.
|
|
103
111
|
*/
|
|
104
112
|
interface FetchTransportConfig {
|
|
105
113
|
baseUrl: string;
|
|
@@ -115,7 +123,12 @@ interface FetchTransportConfig {
|
|
|
115
123
|
* timeouts that turn into retries.
|
|
116
124
|
*/
|
|
117
125
|
timeoutMs?: number;
|
|
118
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Extra attempts after the first, for idempotent requests only (a GET,
|
|
128
|
+
* a query.v1 read, a guarded batch that says so), after a network
|
|
129
|
+
* failure or a 5xx. Default 1: one resend, 150 ms later. 0 turns it off.
|
|
130
|
+
* A plain write is never resent whatever this says.
|
|
131
|
+
*/
|
|
119
132
|
retries?: number;
|
|
120
133
|
fetchImpl?: typeof fetch;
|
|
121
134
|
/**
|
|
@@ -150,7 +163,7 @@ interface UnauthorizedContext {
|
|
|
150
163
|
declare function createFetchTransport(config: FetchTransportConfig): Transport;
|
|
151
164
|
|
|
152
165
|
interface ClientConfig extends Pick<FetchTransportConfig, "credentials" | "onUnauthorized" | "unauthorizedStatuses"> {
|
|
153
|
-
/** The instance base URL: "https://
|
|
166
|
+
/** The instance base URL: "https://agility.example.com/MyInstance". */
|
|
154
167
|
baseUrl: string;
|
|
155
168
|
/** A ready Authorization header value ("Basic …" for a dev instance). Wins over accessToken. */
|
|
156
169
|
authorization?: string;
|
|
@@ -174,13 +187,13 @@ type Oid = string;
|
|
|
174
187
|
/** An ISO-8601 date-time as the API renders it, e.g. "2026-09-06T13:52:51.903". */
|
|
175
188
|
type DateString = string;
|
|
176
189
|
/**
|
|
177
|
-
* An AssetState as the model carries it: the names of
|
|
178
|
-
* enum (
|
|
190
|
+
* An AssetState as the model carries it: the names of the server's AssetState
|
|
191
|
+
* enum (Future 0, Active 64, Closed 128, Dead 192,
|
|
179
192
|
* OldBrokenDownStory 208, Deprecated 254, Deleted 255). rest-1 renders the
|
|
180
193
|
* number and query.v1 the name; the wire layer normalises to the name.
|
|
181
194
|
*/
|
|
182
195
|
type AssetStateValue = "Future" | "Active" | "Closed" | "Dead" | "Template" | "OldBrokenDownStory" | "Deprecated" | "Deleted";
|
|
183
|
-
/**
|
|
196
|
+
/** The server's AssetState codes, by name — the rest-1 rendering. */
|
|
184
197
|
declare const ASSET_STATE_CODES: Record<AssetStateValue, number>;
|
|
185
198
|
/**
|
|
186
199
|
* An AssetState by name, whichever way the endpoint spelled it: api/asset
|
|
@@ -282,7 +295,7 @@ declare namespace attachment {
|
|
|
282
295
|
*
|
|
283
296
|
* Two ways in for the bytes, chosen by size:
|
|
284
297
|
* - inline: one api/asset create with Content as Base64. One request,
|
|
285
|
-
* what
|
|
298
|
+
* what a browser app consumer does; the JSON is a third larger than the file.
|
|
286
299
|
* - two-step, as the docs prescribe for anything not tiny: create the
|
|
287
300
|
* Attachment with empty Content, then POST the raw bytes. A failed
|
|
288
301
|
* upload leaves an empty Attachment, which is reported, not hidden.
|
|
@@ -4165,7 +4178,7 @@ interface QueryBody<F extends string = string> {
|
|
|
4165
4178
|
* scalar or a single relation (null clears it). A multi-value relation is
|
|
4166
4179
|
* changed with `{ add: [...], remove: [...] }`. A plain list does NOT
|
|
4167
4180
|
* replace a multi-value relation: the server ADDS its members, like rest-1's
|
|
4168
|
-
* `act: "add"` (seen live on
|
|
4181
|
+
* `act: "add"` (seen live on the API-testing instance, 2026-11-07). To set one exactly,
|
|
4169
4182
|
* remove what should go and add what should come. A change comment goes in
|
|
4170
4183
|
* the update node as `ChangeComment`.
|
|
4171
4184
|
*/
|
|
@@ -4287,7 +4300,13 @@ declare function fromWireRow<Row extends Asset = Asset>(row: Record<string, unkn
|
|
|
4287
4300
|
interface CommandFailureDetail {
|
|
4288
4301
|
index: number | null;
|
|
4289
4302
|
message: string;
|
|
4290
|
-
|
|
4303
|
+
/**
|
|
4304
|
+
* The command as the server echoed it, under a generated alias: what a
|
|
4305
|
+
* caller resends after correcting it. Readable on every failure but not
|
|
4306
|
+
* enumerable, so a serialised failure (a receipt, a log line) carries
|
|
4307
|
+
* index, message and violation and not the whole command.
|
|
4308
|
+
*/
|
|
4309
|
+
readonly echoed: Record<string, unknown>;
|
|
4291
4310
|
/** The message read as a validation violation, when it is one. */
|
|
4292
4311
|
violation: Violation | null;
|
|
4293
4312
|
}
|
|
@@ -4544,6 +4563,10 @@ declare class TypeCache {
|
|
|
4544
4563
|
/** Loaded types; null records that the instance has no such type, so it is not asked for again. */
|
|
4545
4564
|
readonly types: Map<string, AssetType | null>;
|
|
4546
4565
|
readonly loading: Map<string, Promise<AssetType | null>>;
|
|
4566
|
+
/** The schema's tag the loaded types came with (meta.v1's ETag, one for the whole schema); null until a load, or for a seeded cache. */
|
|
4567
|
+
etag: string | null;
|
|
4568
|
+
/** Forget every loaded type (and the tag): the next query loads afresh. In-flight loads finish into the cache as before. */
|
|
4569
|
+
clear(): void;
|
|
4547
4570
|
/** A cache seeded from a metamodel document. */
|
|
4548
4571
|
static fromMetamodel(metamodel: Metamodel): TypeCache;
|
|
4549
4572
|
}
|
|
@@ -4576,6 +4599,18 @@ declare class Schema implements AttributeLookup {
|
|
|
4576
4599
|
* any other failure (auth, network) is thrown, not swallowed.
|
|
4577
4600
|
*/
|
|
4578
4601
|
load(token: AssetTypeToken): Promise<AssetType | null>;
|
|
4602
|
+
/**
|
|
4603
|
+
* Has the instance's schema changed since these types were loaded? One
|
|
4604
|
+
* small conditional read of meta.v1. Unchanged: nothing happens.
|
|
4605
|
+
* Changed (or never tagged, or the transport cannot see headers): the
|
|
4606
|
+
* loaded types are dropped, so the next query loads them again, and the
|
|
4607
|
+
* new tag is kept. Answers whether it changed and the current tag. A
|
|
4608
|
+
* schema without a transport (seeded) never changes.
|
|
4609
|
+
*/
|
|
4610
|
+
revalidate(): Promise<{
|
|
4611
|
+
changed: boolean;
|
|
4612
|
+
etag: string | null;
|
|
4613
|
+
}>;
|
|
4579
4614
|
/**
|
|
4580
4615
|
* Load whatever the queries in a batch need to have their rows translated:
|
|
4581
4616
|
* the `from` types, then the types behind every relation hop and sub-select,
|
|
@@ -4586,7 +4621,7 @@ declare class Schema implements AttributeLookup {
|
|
|
4586
4621
|
|
|
4587
4622
|
/**
|
|
4588
4623
|
* The batch service: an api/asset batch sent with a record of what it did.
|
|
4589
|
-
* Ported from
|
|
4624
|
+
* Ported from the CLI consumer's batch module — preview, describe, snapshot, send
|
|
4590
4625
|
* (guarded by default), receipt, reverse — minus what is the CLI's: file
|
|
4591
4626
|
* I/O, console output, permalinks and the confirm prompt (a callback here).
|
|
4592
4627
|
*
|
|
@@ -4599,7 +4634,7 @@ declare class Schema implements AttributeLookup {
|
|
|
4599
4634
|
* which were skipped by the guard; and a reverse batch that undoes what
|
|
4600
4635
|
* succeeded, best effort, with a note for anything it cannot.
|
|
4601
4636
|
*
|
|
4602
|
-
* Closing a workitem cascades:
|
|
4637
|
+
* Closing a workitem cascades: the server's Inactivate and QuickClose also close
|
|
4603
4638
|
* its open descendants, and Reactivate reopens only the asset it names. So
|
|
4604
4639
|
* before a batch that closes, the receipt records each closing target's
|
|
4605
4640
|
* open descendants; after it, the ones the close actually closed; and the
|
|
@@ -4818,7 +4853,7 @@ declare function importantName(token: string, types: readonly AssetTypeToken[]):
|
|
|
4818
4853
|
/**
|
|
4819
4854
|
* The guard: an api/asset batch sent as a compare-and-set, so a change only
|
|
4820
4855
|
* lands on an asset nobody else has changed since it was read. Ported from
|
|
4821
|
-
*
|
|
4856
|
+
* the CLI consumer's batch `guarded()`, with a different stamp.
|
|
4822
4857
|
*
|
|
4823
4858
|
* How: preview the batch (the server's projection expands every query-
|
|
4824
4859
|
* scoped update and execute into one command per asset), read each touched
|
|
@@ -4980,6 +5015,108 @@ declare namespace loc2 {
|
|
|
4980
5015
|
export type { loc2_Localizations as Localizations, loc2_LocalizeOptions as LocalizeOptions };
|
|
4981
5016
|
}
|
|
4982
5017
|
|
|
5018
|
+
interface TokenRef {
|
|
5019
|
+
href: string;
|
|
5020
|
+
tokenref: AttributeTokenRef;
|
|
5021
|
+
}
|
|
5022
|
+
interface NameRef {
|
|
5023
|
+
href: string;
|
|
5024
|
+
nameref: AssetTypeToken;
|
|
5025
|
+
}
|
|
5026
|
+
interface AttributeDefinitionDocument {
|
|
5027
|
+
HREF?: string;
|
|
5028
|
+
_type: "AttributeDefinition";
|
|
5029
|
+
Name: string;
|
|
5030
|
+
Token: AttributeTokenRef;
|
|
5031
|
+
DisplayName: string;
|
|
5032
|
+
AttributeType: AttributeType;
|
|
5033
|
+
IsReadOnly: boolean;
|
|
5034
|
+
IsRequired: boolean;
|
|
5035
|
+
IsMultivalue: boolean;
|
|
5036
|
+
IsCanned: boolean;
|
|
5037
|
+
IsCustom: boolean;
|
|
5038
|
+
/** Present on an inherited attribute: the defining ancestor's attribute. */
|
|
5039
|
+
Base?: TokenRef;
|
|
5040
|
+
ReciprocalRelation?: TokenRef;
|
|
5041
|
+
OrderByAttribute?: TokenRef;
|
|
5042
|
+
DisplayByAttribute?: TokenRef;
|
|
5043
|
+
/** Present on a Relation. */
|
|
5044
|
+
RelatedAsset?: NameRef;
|
|
5045
|
+
}
|
|
5046
|
+
interface AssetTypeDocument {
|
|
5047
|
+
HREF?: string;
|
|
5048
|
+
Version?: string;
|
|
5049
|
+
_type: "AssetType";
|
|
5050
|
+
Token: AssetTypeToken;
|
|
5051
|
+
/** The delivered Name is a reference to the type's Name attribute; the token is the name. */
|
|
5052
|
+
Name: TokenRef | string;
|
|
5053
|
+
DisplayName: string;
|
|
5054
|
+
Abstract: boolean;
|
|
5055
|
+
/** Absent on a root type. */
|
|
5056
|
+
Base?: NameRef;
|
|
5057
|
+
DefaultOrderBy?: TokenRef;
|
|
5058
|
+
DefaultDisplayBy?: TokenRef;
|
|
5059
|
+
ShortName?: TokenRef;
|
|
5060
|
+
Description?: TokenRef;
|
|
5061
|
+
Attributes: Record<string, AttributeDefinitionDocument>;
|
|
5062
|
+
Operations?: Record<string, unknown>;
|
|
5063
|
+
Rules?: Record<string, unknown>;
|
|
5064
|
+
}
|
|
5065
|
+
interface MetamodelDocument {
|
|
5066
|
+
HREF?: string;
|
|
5067
|
+
Version: string;
|
|
5068
|
+
AssetTypes: Record<string, AssetTypeDocument>;
|
|
5069
|
+
}
|
|
5070
|
+
declare function toAttributeDefinition(doc: AttributeDefinitionDocument): AttributeDefinition;
|
|
5071
|
+
declare function toAssetType(doc: AssetTypeDocument): AssetType;
|
|
5072
|
+
declare function toMetamodel(doc: MetamodelDocument): Metamodel;
|
|
5073
|
+
/** Is this a metamodel document as meta.v1 delivers it? (A downloaded metamodel.json, say.) */
|
|
5074
|
+
declare function isMetamodelDocument(value: unknown): value is MetamodelDocument;
|
|
5075
|
+
/** A conditional read: the tag a previous answer carried. With it, an unchanged resource is null. */
|
|
5076
|
+
interface ConditionalOptions {
|
|
5077
|
+
ifNoneMatch?: string | null;
|
|
5078
|
+
}
|
|
5079
|
+
/** What a read answered, with the schema's tag as the server sent it (null when it sent none). */
|
|
5080
|
+
interface Tagged<T> {
|
|
5081
|
+
value: T;
|
|
5082
|
+
etag: string | null;
|
|
5083
|
+
}
|
|
5084
|
+
declare function getMetamodel(transport: Transport): Promise<Metamodel>;
|
|
5085
|
+
/** The metamodel with its tag; null when `ifNoneMatch` still matches (nothing was downloaded). */
|
|
5086
|
+
declare function readMetamodel(transport: Transport, options?: ConditionalOptions): Promise<Tagged<Metamodel> | null>;
|
|
5087
|
+
declare function getAssetType(transport: Transport, token: AssetTypeToken): Promise<AssetType>;
|
|
5088
|
+
/** One type with the schema's tag; null when `ifNoneMatch` still matches. */
|
|
5089
|
+
declare function readAssetType(transport: Transport, token: AssetTypeToken, options?: ConditionalOptions): Promise<Tagged<AssetType> | null>;
|
|
5090
|
+
/**
|
|
5091
|
+
* The schema's current tag, from one small read, or null when the server
|
|
5092
|
+
* sends none. With `ifNoneMatch`, "unchanged" is answered as that same tag
|
|
5093
|
+
* without a body — the cheapest way to ask whether anything in meta moved.
|
|
5094
|
+
*/
|
|
5095
|
+
declare function etag(transport: Transport, options?: ConditionalOptions): Promise<string | null>;
|
|
5096
|
+
declare function getAttributeDefinition(transport: Transport, tokenref: AttributeTokenRef): Promise<AttributeDefinition>;
|
|
5097
|
+
|
|
5098
|
+
type meta_AssetTypeDocument = AssetTypeDocument;
|
|
5099
|
+
type meta_AttributeDefinitionDocument = AttributeDefinitionDocument;
|
|
5100
|
+
type meta_ConditionalOptions = ConditionalOptions;
|
|
5101
|
+
type meta_MetamodelDocument = MetamodelDocument;
|
|
5102
|
+
type meta_NameRef = NameRef;
|
|
5103
|
+
type meta_Tagged<T> = Tagged<T>;
|
|
5104
|
+
type meta_TokenRef = TokenRef;
|
|
5105
|
+
declare const meta_etag: typeof etag;
|
|
5106
|
+
declare const meta_getAssetType: typeof getAssetType;
|
|
5107
|
+
declare const meta_getAttributeDefinition: typeof getAttributeDefinition;
|
|
5108
|
+
declare const meta_getMetamodel: typeof getMetamodel;
|
|
5109
|
+
declare const meta_isMetamodelDocument: typeof isMetamodelDocument;
|
|
5110
|
+
declare const meta_readAssetType: typeof readAssetType;
|
|
5111
|
+
declare const meta_readMetamodel: typeof readMetamodel;
|
|
5112
|
+
declare const meta_toAssetType: typeof toAssetType;
|
|
5113
|
+
declare const meta_toAttributeDefinition: typeof toAttributeDefinition;
|
|
5114
|
+
declare const meta_toMetamodel: typeof toMetamodel;
|
|
5115
|
+
declare namespace meta {
|
|
5116
|
+
export { meta_etag as etag, meta_getAssetType as getAssetType, meta_getAttributeDefinition as getAttributeDefinition, meta_getMetamodel as getMetamodel, meta_isMetamodelDocument as isMetamodelDocument, meta_readAssetType as readAssetType, meta_readMetamodel as readMetamodel, meta_toAssetType as toAssetType, meta_toAttributeDefinition as toAttributeDefinition, meta_toMetamodel as toMetamodel };
|
|
5117
|
+
export type { meta_AssetTypeDocument as AssetTypeDocument, meta_AttributeDefinitionDocument as AttributeDefinitionDocument, meta_ConditionalOptions as ConditionalOptions, meta_MetamodelDocument as MetamodelDocument, meta_NameRef as NameRef, meta_Tagged as Tagged, meta_TokenRef as TokenRef };
|
|
5118
|
+
}
|
|
5119
|
+
|
|
4983
5120
|
interface AssetRefDocument {
|
|
4984
5121
|
_type: "Asset";
|
|
4985
5122
|
href: string;
|
|
@@ -5213,11 +5350,21 @@ declare class AgilityApiClient {
|
|
|
5213
5350
|
all<Row extends Asset = Asset>(q: QueryBody, options?: PagesOptions): Promise<Row[]>;
|
|
5214
5351
|
/** The member these credentials belong to (Member.IsSelf, live 2026-11-12): what a comment's Author is. */
|
|
5215
5352
|
me(): Promise<Me>;
|
|
5216
|
-
/**
|
|
5353
|
+
/**
|
|
5354
|
+
* meta.v1: the instance's schema, raw. (The translated, cached view is
|
|
5355
|
+
* `schema`; `schema.revalidate()` drops it when the schema's tag moves.)
|
|
5356
|
+
* `read` and `readType` are conditional: pass the tag a previous answer
|
|
5357
|
+
* carried and an unchanged schema answers null without a download —
|
|
5358
|
+
* meta.v1 sends one strong ETag for the whole schema. `etag()` reads that
|
|
5359
|
+
* tag alone, from the smallest resource.
|
|
5360
|
+
*/
|
|
5217
5361
|
readonly meta: {
|
|
5218
5362
|
metamodel: () => Promise<Metamodel>;
|
|
5363
|
+
read: (options?: ConditionalOptions) => Promise<Tagged<Metamodel> | null>;
|
|
5219
5364
|
assetType: (token: string) => Promise<AssetType>;
|
|
5365
|
+
readType: (token: string, options?: ConditionalOptions) => Promise<Tagged<AssetType> | null>;
|
|
5220
5366
|
attributeDefinition: (tokenref: `${string}.${string}`) => Promise<AttributeDefinition>;
|
|
5367
|
+
etag: (options?: ConditionalOptions) => Promise<string | null>;
|
|
5221
5368
|
};
|
|
5222
5369
|
/**
|
|
5223
5370
|
* loc-2.v1: labels for tags, in one request (meta's DisplayName values are
|
|
@@ -5379,84 +5526,11 @@ declare class AgilityApiClient {
|
|
|
5379
5526
|
};
|
|
5380
5527
|
}
|
|
5381
5528
|
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
interface NameRef {
|
|
5387
|
-
href: string;
|
|
5388
|
-
nameref: AssetTypeToken;
|
|
5389
|
-
}
|
|
5390
|
-
interface AttributeDefinitionDocument {
|
|
5391
|
-
HREF?: string;
|
|
5392
|
-
_type: "AttributeDefinition";
|
|
5393
|
-
Name: string;
|
|
5394
|
-
Token: AttributeTokenRef;
|
|
5395
|
-
DisplayName: string;
|
|
5396
|
-
AttributeType: AttributeType;
|
|
5397
|
-
IsReadOnly: boolean;
|
|
5398
|
-
IsRequired: boolean;
|
|
5399
|
-
IsMultivalue: boolean;
|
|
5400
|
-
IsCanned: boolean;
|
|
5401
|
-
IsCustom: boolean;
|
|
5402
|
-
/** Present on an inherited attribute: the defining ancestor's attribute. */
|
|
5403
|
-
Base?: TokenRef;
|
|
5404
|
-
ReciprocalRelation?: TokenRef;
|
|
5405
|
-
OrderByAttribute?: TokenRef;
|
|
5406
|
-
DisplayByAttribute?: TokenRef;
|
|
5407
|
-
/** Present on a Relation. */
|
|
5408
|
-
RelatedAsset?: NameRef;
|
|
5409
|
-
}
|
|
5410
|
-
interface AssetTypeDocument {
|
|
5411
|
-
HREF?: string;
|
|
5412
|
-
Version?: string;
|
|
5413
|
-
_type: "AssetType";
|
|
5414
|
-
Token: AssetTypeToken;
|
|
5415
|
-
/** The delivered Name is a reference to the type's Name attribute; the token is the name. */
|
|
5416
|
-
Name: TokenRef | string;
|
|
5417
|
-
DisplayName: string;
|
|
5418
|
-
Abstract: boolean;
|
|
5419
|
-
/** Absent on a root type. */
|
|
5420
|
-
Base?: NameRef;
|
|
5421
|
-
DefaultOrderBy?: TokenRef;
|
|
5422
|
-
DefaultDisplayBy?: TokenRef;
|
|
5423
|
-
ShortName?: TokenRef;
|
|
5424
|
-
Description?: TokenRef;
|
|
5425
|
-
Attributes: Record<string, AttributeDefinitionDocument>;
|
|
5426
|
-
Operations?: Record<string, unknown>;
|
|
5427
|
-
Rules?: Record<string, unknown>;
|
|
5428
|
-
}
|
|
5429
|
-
interface MetamodelDocument {
|
|
5430
|
-
HREF?: string;
|
|
5431
|
-
Version: string;
|
|
5432
|
-
AssetTypes: Record<string, AssetTypeDocument>;
|
|
5433
|
-
}
|
|
5434
|
-
declare function toAttributeDefinition(doc: AttributeDefinitionDocument): AttributeDefinition;
|
|
5435
|
-
declare function toAssetType(doc: AssetTypeDocument): AssetType;
|
|
5436
|
-
declare function toMetamodel(doc: MetamodelDocument): Metamodel;
|
|
5437
|
-
/** Is this a metamodel document as meta.v1 delivers it? (A downloaded metamodel.json, say.) */
|
|
5438
|
-
declare function isMetamodelDocument(value: unknown): value is MetamodelDocument;
|
|
5439
|
-
declare function getMetamodel(transport: Transport): Promise<Metamodel>;
|
|
5440
|
-
declare function getAssetType(transport: Transport, token: AssetTypeToken): Promise<AssetType>;
|
|
5441
|
-
declare function getAttributeDefinition(transport: Transport, tokenref: AttributeTokenRef): Promise<AttributeDefinition>;
|
|
5442
|
-
|
|
5443
|
-
type meta_AssetTypeDocument = AssetTypeDocument;
|
|
5444
|
-
type meta_AttributeDefinitionDocument = AttributeDefinitionDocument;
|
|
5445
|
-
type meta_MetamodelDocument = MetamodelDocument;
|
|
5446
|
-
type meta_NameRef = NameRef;
|
|
5447
|
-
type meta_TokenRef = TokenRef;
|
|
5448
|
-
declare const meta_getAssetType: typeof getAssetType;
|
|
5449
|
-
declare const meta_getAttributeDefinition: typeof getAttributeDefinition;
|
|
5450
|
-
declare const meta_getMetamodel: typeof getMetamodel;
|
|
5451
|
-
declare const meta_isMetamodelDocument: typeof isMetamodelDocument;
|
|
5452
|
-
declare const meta_toAssetType: typeof toAssetType;
|
|
5453
|
-
declare const meta_toAttributeDefinition: typeof toAttributeDefinition;
|
|
5454
|
-
declare const meta_toMetamodel: typeof toMetamodel;
|
|
5455
|
-
declare namespace meta {
|
|
5456
|
-
export { meta_getAssetType as getAssetType, meta_getAttributeDefinition as getAttributeDefinition, meta_getMetamodel as getMetamodel, meta_isMetamodelDocument as isMetamodelDocument, meta_toAssetType as toAssetType, meta_toAttributeDefinition as toAttributeDefinition, meta_toMetamodel as toMetamodel };
|
|
5457
|
-
export type { meta_AssetTypeDocument as AssetTypeDocument, meta_AttributeDefinitionDocument as AttributeDefinitionDocument, meta_MetamodelDocument as MetamodelDocument, meta_NameRef as NameRef, meta_TokenRef as TokenRef };
|
|
5529
|
+
/** What query.v1 said about each refused query: its exception type and message. */
|
|
5530
|
+
interface QueryRejection {
|
|
5531
|
+
type: string | null;
|
|
5532
|
+
message: string;
|
|
5458
5533
|
}
|
|
5459
|
-
|
|
5460
5534
|
/**
|
|
5461
5535
|
* Several queries in one request; one array of rows per query, in order, []
|
|
5462
5536
|
* where a query matched nothing. A page is required on every query. A
|
|
@@ -5467,13 +5541,12 @@ declare function queries<Row extends Asset = Asset>(transport: Transport, qs: Qu
|
|
|
5467
5541
|
/** One query, its rows. */
|
|
5468
5542
|
declare function query<Row extends Asset = Asset>(transport: Transport, q: QueryBody, options?: ReadOptions): Promise<Row[]>;
|
|
5469
5543
|
|
|
5544
|
+
type queryV1_QueryRejection = QueryRejection;
|
|
5470
5545
|
declare const queryV1_queries: typeof queries;
|
|
5471
5546
|
declare const queryV1_query: typeof query;
|
|
5472
5547
|
declare namespace queryV1 {
|
|
5473
|
-
export {
|
|
5474
|
-
|
|
5475
|
-
queryV1_query as query,
|
|
5476
|
-
};
|
|
5548
|
+
export { queryV1_queries as queries, queryV1_query as query };
|
|
5549
|
+
export type { queryV1_QueryRejection as QueryRejection };
|
|
5477
5550
|
}
|
|
5478
5551
|
|
|
5479
5552
|
/** The attributes shown for each type in the scopes given: a map from type token to sorted attribute names. */
|
|
@@ -5491,4 +5564,4 @@ declare namespace fields {
|
|
|
5491
5564
|
}
|
|
5492
5565
|
|
|
5493
5566
|
export { ASSET_STATE_CODES, AgilityApiClient, ApiError, AttachmentUploadError, BatchRecordError, BatchSendError, CommandFailureError, INLINE_LIMIT, INVERSE, NUMBER_ROOTS, CHUNK as RESOLVE_CHUNK, Schema, TypeCache, UNGUARDABLE_TYPES, UnguardableError, UsageError, WrappedError, assetApi, assetStateOf, attachment, createFetchTransport, describe as describeBatch, fields, guard, importantName, isAssetNumber, isOidToken, kindOf, loc2, meta, momentless, namesOf, parseOid, parseViolation, queryV1, resolveNumbers, resolveRef, rest1, reverseOf, reversible, runBatch, select, sendGuarded, snapshot, stampsOf, toOid, touchedBy, typeOfOid, unguardable };
|
|
5494
|
-
export type { Access, Actual, Allocation, Application, Asset, AssetApiResponse, AssetChangedEventDefinition, AssetCreatedEventDefinition, AssetDocument, AssetNumberAttributeDefinition, AssetStateValue, AssetType, AssetTypeMap, AssetTypeName, AssetTypeToken, AssetsDocument, Attachment, AddOptions as AttachmentAddOptions, AttachmentCategory, AttachmentInfo, AttributeAddedEventDefinition, AttributeChangedEventDefinition, AttributeDefinition, AttributeLookup, AttributeRemovedEventDefinition, AttributeTokenRef, AttributeType, AttributeValue, BaseAsset, BatchOptions, Budget, BuildProject, BuildRun, BuildSource, BuildStatus, Bundle, BusinessRule, Bytes, CalendarEvent, CalendarEventCategory, Capacity, ChangeSet, ClassOfService, ClientConfig, ClientOptions, Command, CommandBody, CommandFailureDetail, CommandValue, Community, Concept, ConcreteAssetTypeName, Conversation, CreateBody, CreateType, CredentialsAttributeDefinition, CustomAttributes, CustomList, DateString, DefaultRule, Defect, DefectResolution, DefectType, Delivery, DeliveryCategory, Described, EmbeddedImage$1 as EmbeddedImage, Environment, Epic, EpicCategory, EpicPriority, EpicStatus, ErrorKind, ExecuteBody, ExecuteSecurityCheckAttributeDefinition, Expression, ExpressionImage, ExpressionSpace, ExternalAction, ExternalActionInvocation, FetchTransportConfig, FieldsOf, From, Goal, GoalCategory, GoalPriority, Grant, GuardedResult, HierarchyRelationDefinition, Idea, IdeaCategory, IdeaChangeSet, IdeaComment, IdeaForum, IdeaStatus, IdeaUser, IdeasUserCache, Image, Issue, IssueCategory, IssuePriority, IssueResolution, IssueStatus, KeyResult, KeyResultCommitment, KeyResultUnit, Label, Link, LinkCategory, List, Localizations, LocalizeOptions, ManyToManyRelationDefinition, Me, Member, MemberLabel, Message, MessageReceipt, Metamodel, Milestone, MilestoneCategory, MultivalueAttributeDefinition, NameLookupFailure, Named, NoteCategory, Oid, OidParts, Okr, OkrObjective, OkrSession, OneToManyRelationDefinition, OperationExecutedEventDefinition, OperationResult, Outcome, Page, PagesOptions, PasswordAttributeDefinition, Phase, PlanningLevel, PlanningRoom, PrimaryWorkitem, PrincipalAttributeDefinition, Publication, QueryBody, ReadOptions, ReadParams, ReadResult, Receipt, Ref, RegressionPlan, RegressionSuite, RegressionTest, RegressionTestStatus, Release, Request, RequestBody, RequestCategory, RequestOptions, RequestPriority, RequestResolution, RequestStatus, Resolution, ResolvedAsset, ResponseType, Retrospective, RetrospectivePrompt, RetrospectiveTopic, Reverse, Roadmap, Role, Room, RowContext, RowOf, RowsOf, SavedView, Schedule, Scheme, Scope, ScopeLabel, ScopeStatus, SelectKey, SelectPath, SelectValue, Selected, SendOptions, SimpleAttributeDefinition, State, Status, Story, StoryCategory, StorySource, StoryStatus, StrategicTheme, StrategicThemeLevel, Subscription, SubscriptionTerm, SyntheticAttributeDefinition, Task, TaskCategory, TaskSource, TaskStatus, Team, TeamRoom, TeamWorkflow, Template, Test, TestCategory, TestRun, TestSet, TestStatus, TestSuite, Theme, ThemeCategory, ThemeLabel, ThemeSource, ThemeStatus, Timebox, Timesheet, Topic, Transport, TriggerType, TypeOf, UnauthorizedContext, UnauthorizedDecision, Unguardable, UpdateBody, UpdateSecurityCheckAttributeDefinition, ValueStream, VersionLabel, Violation, Workflow, WorkflowTransition, Workitem, WorkitemPriority, WorkitemRisk };
|
|
5567
|
+
export type { Access, Actual, Allocation, Application, Asset, AssetApiResponse, AssetChangedEventDefinition, AssetCreatedEventDefinition, AssetDocument, AssetNumberAttributeDefinition, AssetStateValue, AssetType, AssetTypeMap, AssetTypeName, AssetTypeToken, AssetsDocument, Attachment, AddOptions as AttachmentAddOptions, AttachmentCategory, AttachmentInfo, AttributeAddedEventDefinition, AttributeChangedEventDefinition, AttributeDefinition, AttributeLookup, AttributeRemovedEventDefinition, AttributeTokenRef, AttributeType, AttributeValue, BaseAsset, BatchOptions, Budget, BuildProject, BuildRun, BuildSource, BuildStatus, Bundle, BusinessRule, Bytes, CalendarEvent, CalendarEventCategory, Capacity, ChangeSet, ClassOfService, ClientConfig, ClientOptions, Command, CommandBody, CommandFailureDetail, CommandValue, Community, Concept, ConcreteAssetTypeName, ConditionalOptions, Conversation, CreateBody, CreateType, CredentialsAttributeDefinition, CustomAttributes, CustomList, DateString, DefaultRule, Defect, DefectResolution, DefectType, Delivery, DeliveryCategory, Described, EmbeddedImage$1 as EmbeddedImage, Environment, Epic, EpicCategory, EpicPriority, EpicStatus, ErrorKind, ExecuteBody, ExecuteSecurityCheckAttributeDefinition, Expression, ExpressionImage, ExpressionSpace, ExternalAction, ExternalActionInvocation, FetchTransportConfig, FieldsOf, From, Goal, GoalCategory, GoalPriority, Grant, GuardedResult, HierarchyRelationDefinition, Idea, IdeaCategory, IdeaChangeSet, IdeaComment, IdeaForum, IdeaStatus, IdeaUser, IdeasUserCache, Image, Issue, IssueCategory, IssuePriority, IssueResolution, IssueStatus, KeyResult, KeyResultCommitment, KeyResultUnit, Label, Link, LinkCategory, List, Localizations, LocalizeOptions, ManyToManyRelationDefinition, Me, Member, MemberLabel, Message, MessageReceipt, Metamodel, Milestone, MilestoneCategory, MultivalueAttributeDefinition, NameLookupFailure, Named, NoteCategory, Oid, OidParts, Okr, OkrObjective, OkrSession, OneToManyRelationDefinition, OperationExecutedEventDefinition, OperationResult, Outcome, Page, PagesOptions, PasswordAttributeDefinition, Phase, PlanningLevel, PlanningRoom, PrimaryWorkitem, PrincipalAttributeDefinition, Publication, QueryBody, QueryRejection, ReadOptions, ReadParams, ReadResult, Receipt, Ref, RegressionPlan, RegressionSuite, RegressionTest, RegressionTestStatus, Release, Request, RequestBody, RequestCategory, RequestOptions, RequestPriority, RequestResolution, RequestStatus, Resolution, ResolvedAsset, ResponseType, Retrospective, RetrospectivePrompt, RetrospectiveTopic, Reverse, Roadmap, Role, Room, RowContext, RowOf, RowsOf, SavedView, Schedule, Scheme, Scope, ScopeLabel, ScopeStatus, SelectKey, SelectPath, SelectValue, Selected, SendOptions, SimpleAttributeDefinition, State, Status, Story, StoryCategory, StorySource, StoryStatus, StrategicTheme, StrategicThemeLevel, Subscription, SubscriptionTerm, SyntheticAttributeDefinition, Tagged, Task, TaskCategory, TaskSource, TaskStatus, Team, TeamRoom, TeamWorkflow, Template, Test, TestCategory, TestRun, TestSet, TestStatus, TestSuite, Theme, ThemeCategory, ThemeLabel, ThemeSource, ThemeStatus, Timebox, Timesheet, Topic, Transport, TriggerType, TypeOf, UnauthorizedContext, UnauthorizedDecision, Unguardable, UpdateBody, UpdateSecurityCheckAttributeDefinition, ValueStream, VersionLabel, Violation, Workflow, WorkflowTransition, Workitem, WorkitemPriority, WorkitemRisk };
|