@griffin-app/griffin-hub-sdk 1.0.0 → 1.0.1
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/.openapi-generator/FILES +15 -20
- package/README.md +18 -24
- package/api.ts +389 -617
- package/dist/api.d.ts +221 -356
- package/dist/api.js +281 -473
- package/dist/esm/api.d.ts +221 -356
- package/dist/esm/api.js +272 -460
- package/dist/openapi-ts.config.d.ts +2 -0
- package/dist/openapi-ts.config.js +14 -0
- package/dist/openapi-ts.config.js.map +1 -0
- package/dist/src/client/client/client.gen.d.ts +2 -0
- package/dist/src/client/client/client.gen.js +199 -0
- package/dist/src/client/client/client.gen.js.map +1 -0
- package/dist/src/client/client/index.d.ts +8 -0
- package/dist/src/client/client/index.js +6 -0
- package/dist/src/client/client/index.js.map +1 -0
- package/dist/src/client/client/types.gen.d.ts +68 -0
- package/dist/src/client/client/types.gen.js +2 -0
- package/dist/src/client/client/types.gen.js.map +1 -0
- package/dist/src/client/client/utils.gen.d.ts +30 -0
- package/dist/src/client/client/utils.gen.js +232 -0
- package/dist/src/client/client/utils.gen.js.map +1 -0
- package/dist/src/client/client.gen.d.ts +4 -0
- package/dist/src/client/client.gen.js +3 -0
- package/dist/src/client/client.gen.js.map +1 -0
- package/dist/src/client/core/auth.gen.d.ts +8 -0
- package/dist/src/client/core/auth.gen.js +23 -0
- package/dist/src/client/core/auth.gen.js.map +1 -0
- package/dist/src/client/core/bodySerializer.gen.d.ts +21 -0
- package/dist/src/client/core/bodySerializer.gen.js +57 -0
- package/dist/src/client/core/bodySerializer.gen.js.map +1 -0
- package/dist/src/client/core/params.gen.d.ts +26 -0
- package/dist/src/client/core/params.gen.js +100 -0
- package/dist/src/client/core/params.gen.js.map +1 -0
- package/dist/src/client/core/pathSerializer.gen.d.ts +30 -0
- package/dist/src/client/core/pathSerializer.gen.js +114 -0
- package/dist/src/client/core/pathSerializer.gen.js.map +1 -0
- package/dist/src/client/core/queryKeySerializer.gen.d.ts +6 -0
- package/dist/src/client/core/queryKeySerializer.gen.js +84 -0
- package/dist/src/client/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/src/client/core/serverSentEvents.gen.d.ts +23 -0
- package/dist/src/client/core/serverSentEvents.gen.js +153 -0
- package/dist/src/client/core/serverSentEvents.gen.js.map +1 -0
- package/dist/src/client/core/types.gen.d.ts +32 -0
- package/dist/src/client/core/types.gen.js +2 -0
- package/dist/src/client/core/types.gen.js.map +1 -0
- package/dist/src/client/core/utils.gen.d.ts +19 -0
- package/dist/src/client/core/utils.gen.js +84 -0
- package/dist/src/client/core/utils.gen.js.map +1 -0
- package/dist/src/client/index.d.ts +2 -0
- package/dist/src/client/index.js +2 -0
- package/dist/src/client/index.js.map +1 -0
- package/dist/src/client/sdk.gen.d.ts +11 -0
- package/dist/src/client/sdk.gen.js +10 -0
- package/dist/src/client/sdk.gen.js.map +1 -0
- package/dist/src/client/types.gen.d.ts +217 -0
- package/dist/src/client/types.gen.js +2 -0
- package/dist/src/client/types.gen.js.map +1 -0
- package/docs/{Assertion1AnyOf.md → AssertionAnyOf.md} +3 -3
- package/docs/{Assertion1AnyOf1.md → AssertionAnyOf1.md} +3 -3
- package/docs/{Assertion1AnyOf2.md → AssertionAnyOf2.md} +3 -3
- package/docs/Assertions.md +1 -1
- package/docs/{Assertion1.md → AssertionsAssertionsInner.md} +4 -4
- package/docs/AssertionsAssertionsInnerAnyOf.md +28 -0
- package/docs/AssertionsAssertionsInnerAnyOfAllOfPredicate.md +22 -0
- package/docs/AssertionsAssertionsInnerAnyOfAllOfPredicateAnyOf.md +22 -0
- package/docs/Endpoint.md +3 -3
- package/docs/{Endpoint1HeadersValue.md → EndpointHeadersValue.md} +4 -4
- package/docs/{Endpoint1HeadersValueAnyOf.md → EndpointHeadersValueAnyOf.md} +4 -4
- package/docs/{Endpoint1HeadersValueAnyOfSecret.md → EndpointHeadersValueAnyOfSecret.md} +3 -3
- package/docs/{Edge1.md → EndpointPath.md} +5 -7
- package/docs/{Wait1.md → EndpointPathAnyOf.md} +5 -9
- package/docs/{Endpoint1Base.md → EndpointPathAnyOfVariable.md} +5 -5
- package/docs/Node.md +4 -4
- package/docs/PlanApi.md +195 -5
- package/docs/PlanPostRequest.md +34 -0
- package/docs/PlanPostRequestFrequency.md +22 -0
- package/docs/TestPlanV1.md +4 -6
- package/package.json +1 -1
- package/docs/Assertions1.md +0 -24
- package/docs/ConfigApi.md +0 -330
- package/docs/ConfigGet200Response.md +0 -20
- package/docs/ConfigOrganizationIdEnvironmentTargetsTargetKeyGet200Response.md +0 -20
- package/docs/ConfigOrganizationIdEnvironmentTargetsTargetKeyGet200ResponseData.md +0 -20
- package/docs/ConfigOrganizationIdEnvironmentTargetsTargetKeyPut200Response.md +0 -20
- package/docs/ConfigOrganizationIdEnvironmentTargetsTargetKeyPut200ResponseData.md +0 -30
- package/docs/ConfigOrganizationIdEnvironmentTargetsTargetKeyPutRequest.md +0 -20
- package/docs/Endpoint1.md +0 -34
- package/docs/Node1.md +0 -38
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
2
|
+
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
3
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
4
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
5
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
6
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
7
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
8
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
9
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
10
|
+
function fulfill(value) { resume("next", value); }
|
|
11
|
+
function reject(value) { resume("throw", value); }
|
|
12
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
13
|
+
};
|
|
14
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
15
|
+
var t = {};
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
+
t[p] = s[p];
|
|
18
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
+
t[p[i]] = s[p[i]];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
export const createSseClient = (_a) => {
|
|
26
|
+
var { onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url } = _a, options = __rest(_a, ["onRequest", "onSseError", "onSseEvent", "responseTransformer", "responseValidator", "sseDefaultRetryDelay", "sseMaxRetryAttempts", "sseMaxRetryDelay", "sseSleepFn", "url"]);
|
|
27
|
+
let lastEventId;
|
|
28
|
+
const sleep = sseSleepFn !== null && sseSleepFn !== void 0 ? sseSleepFn : ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
29
|
+
const createStream = function () {
|
|
30
|
+
return __asyncGenerator(this, arguments, function* () {
|
|
31
|
+
var _a, _b, _c;
|
|
32
|
+
let retryDelay = sseDefaultRetryDelay !== null && sseDefaultRetryDelay !== void 0 ? sseDefaultRetryDelay : 3000;
|
|
33
|
+
let attempt = 0;
|
|
34
|
+
const signal = (_a = options.signal) !== null && _a !== void 0 ? _a : new AbortController().signal;
|
|
35
|
+
while (true) {
|
|
36
|
+
if (signal.aborted)
|
|
37
|
+
break;
|
|
38
|
+
attempt++;
|
|
39
|
+
const headers = options.headers instanceof Headers
|
|
40
|
+
? options.headers
|
|
41
|
+
: new Headers(options.headers);
|
|
42
|
+
if (lastEventId !== undefined) {
|
|
43
|
+
headers.set('Last-Event-ID', lastEventId);
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const requestInit = Object.assign(Object.assign({ redirect: 'follow' }, options), { body: options.serializedBody, headers,
|
|
47
|
+
signal });
|
|
48
|
+
let request = new Request(url, requestInit);
|
|
49
|
+
if (onRequest) {
|
|
50
|
+
request = yield __await(onRequest(url, requestInit));
|
|
51
|
+
}
|
|
52
|
+
const _fetch = (_b = options.fetch) !== null && _b !== void 0 ? _b : globalThis.fetch;
|
|
53
|
+
const response = yield __await(_fetch(request));
|
|
54
|
+
if (!response.ok)
|
|
55
|
+
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
56
|
+
if (!response.body)
|
|
57
|
+
throw new Error('No body in SSE response');
|
|
58
|
+
const reader = response.body
|
|
59
|
+
.pipeThrough(new TextDecoderStream())
|
|
60
|
+
.getReader();
|
|
61
|
+
let buffer = '';
|
|
62
|
+
const abortHandler = () => {
|
|
63
|
+
try {
|
|
64
|
+
reader.cancel();
|
|
65
|
+
}
|
|
66
|
+
catch (_a) {
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
signal.addEventListener('abort', abortHandler);
|
|
70
|
+
try {
|
|
71
|
+
while (true) {
|
|
72
|
+
const { done, value } = yield __await(reader.read());
|
|
73
|
+
if (done)
|
|
74
|
+
break;
|
|
75
|
+
buffer += value;
|
|
76
|
+
buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n');
|
|
77
|
+
const chunks = buffer.split('\n\n');
|
|
78
|
+
buffer = (_c = chunks.pop()) !== null && _c !== void 0 ? _c : '';
|
|
79
|
+
for (const chunk of chunks) {
|
|
80
|
+
const lines = chunk.split('\n');
|
|
81
|
+
const dataLines = [];
|
|
82
|
+
let eventName;
|
|
83
|
+
for (const line of lines) {
|
|
84
|
+
if (line.startsWith('data:')) {
|
|
85
|
+
dataLines.push(line.replace(/^data:\s*/, ''));
|
|
86
|
+
}
|
|
87
|
+
else if (line.startsWith('event:')) {
|
|
88
|
+
eventName = line.replace(/^event:\s*/, '');
|
|
89
|
+
}
|
|
90
|
+
else if (line.startsWith('id:')) {
|
|
91
|
+
lastEventId = line.replace(/^id:\s*/, '');
|
|
92
|
+
}
|
|
93
|
+
else if (line.startsWith('retry:')) {
|
|
94
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10);
|
|
95
|
+
if (!Number.isNaN(parsed)) {
|
|
96
|
+
retryDelay = parsed;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
let data;
|
|
101
|
+
let parsedJson = false;
|
|
102
|
+
if (dataLines.length) {
|
|
103
|
+
const rawData = dataLines.join('\n');
|
|
104
|
+
try {
|
|
105
|
+
data = JSON.parse(rawData);
|
|
106
|
+
parsedJson = true;
|
|
107
|
+
}
|
|
108
|
+
catch (_d) {
|
|
109
|
+
data = rawData;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (parsedJson) {
|
|
113
|
+
if (responseValidator) {
|
|
114
|
+
yield __await(responseValidator(data));
|
|
115
|
+
}
|
|
116
|
+
if (responseTransformer) {
|
|
117
|
+
data = yield __await(responseTransformer(data));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
onSseEvent === null || onSseEvent === void 0 ? void 0 : onSseEvent({
|
|
121
|
+
data,
|
|
122
|
+
event: eventName,
|
|
123
|
+
id: lastEventId,
|
|
124
|
+
retry: retryDelay,
|
|
125
|
+
});
|
|
126
|
+
if (dataLines.length) {
|
|
127
|
+
yield yield __await(data);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
finally {
|
|
133
|
+
signal.removeEventListener('abort', abortHandler);
|
|
134
|
+
reader.releaseLock();
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
onSseError === null || onSseError === void 0 ? void 0 : onSseError(error);
|
|
140
|
+
if (sseMaxRetryAttempts !== undefined &&
|
|
141
|
+
attempt >= sseMaxRetryAttempts) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
const backoff = Math.min(retryDelay * Math.pow(2, (attempt - 1)), sseMaxRetryDelay !== null && sseMaxRetryDelay !== void 0 ? sseMaxRetryDelay : 30000);
|
|
145
|
+
yield __await(sleep(backoff));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
const stream = createStream();
|
|
151
|
+
return { stream };
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=serverSentEvents.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverSentEvents.gen.js","sourceRoot":"","sources":["../../../../src/client/core/serverSentEvents.gen.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwFA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAkB,EAYvB,EAAiC,EAAE;QAZZ,EAC/C,SAAS,EACT,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,GAAG,OAEqB,EADrB,OAAO,cAXqC,6KAYhD,CADW;IAEV,IAAI,WAA+B,CAAC;IAEpC,MAAM,KAAK,GACT,UAAU,aAAV,UAAU,cAAV,UAAU,GACV,CAAC,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC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,IAAI,mBAAmB,EAAE,CAAC;wCACxB,IAAI,GAAG,cAAM,mBAAmB,CAAC,IAAI,CAAC,CAAA,CAAC;oCACzC,CAAC;gCACH,CAAC;gCAED,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG;oCACX,IAAI;oCACJ,KAAK,EAAE,SAAS;oCAChB,EAAE,EAAE,WAAW;oCACf,KAAK,EAAE,UAAU;iCAClB,CAAC,CAAC;gCAEH,IAAI,SAAS,CAAC,MAAM,EAAE,CAAC;oCACrB,oBAAM,IAAW,CAAA,CAAC;gCACpB,CAAC;4BACH,CAAC;wBACH,CAAC;oBACH,CAAC;4BAAS,CAAC;wBACT,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;wBAClD,MAAM,CAAC,WAAW,EAAE,CAAC;oBACvB,CAAC;oBAED,MAAM;gBACR,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBAEf,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAG,KAAK,CAAC,CAAC;oBAEpB,IACE,mBAAmB,KAAK,SAAS;wBACjC,OAAO,IAAI,mBAAmB,EAC9B,CAAC;wBACD,MAAM;oBACR,CAAC;oBAGD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CACtB,UAAU,GAAG,SAAA,CAAC,EAAI,CAAC,OAAO,GAAG,CAAC,CAAC,CAAA,EAC/B,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,KAAK,CAC1B,CAAC;oBACF,cAAM,KAAK,CAAC,OAAO,CAAC,CAAA,CAAC;gBACvB,CAAC;YACH,CAAC;QACH,CAAC;KAAA,CAAC;IAEF,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Auth, AuthToken } from './auth.gen';
|
|
2
|
+
import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';
|
|
3
|
+
export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
4
|
+
export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
5
|
+
buildUrl: BuildUrlFn;
|
|
6
|
+
getConfig: () => Config;
|
|
7
|
+
request: RequestFn;
|
|
8
|
+
setConfig: (config: Config) => Config;
|
|
9
|
+
} & {
|
|
10
|
+
[K in HttpMethod]: MethodFn;
|
|
11
|
+
} & ([SseFn] extends [never] ? {
|
|
12
|
+
sse?: never;
|
|
13
|
+
} : {
|
|
14
|
+
sse: {
|
|
15
|
+
[K in HttpMethod]: SseFn;
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
export interface Config {
|
|
19
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
20
|
+
bodySerializer?: BodySerializer | null;
|
|
21
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
22
|
+
method?: Uppercase<HttpMethod>;
|
|
23
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
24
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
25
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
26
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
27
|
+
}
|
|
28
|
+
type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
|
|
29
|
+
export type OmitNever<T extends Record<string, unknown>> = {
|
|
30
|
+
[K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../../../src/client/core/types.gen.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
|
|
2
|
+
export interface PathSerializer {
|
|
3
|
+
path: Record<string, unknown>;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PATH_PARAM_RE: RegExp;
|
|
7
|
+
export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
|
|
8
|
+
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
path?: Record<string, unknown>;
|
|
11
|
+
query?: Record<string, unknown>;
|
|
12
|
+
querySerializer: QuerySerializer;
|
|
13
|
+
url: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
export declare function getValidRequestBody(options: {
|
|
16
|
+
body?: unknown;
|
|
17
|
+
bodySerializer?: BodySerializer | null;
|
|
18
|
+
serializedBody?: unknown;
|
|
19
|
+
}): unknown;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen';
|
|
2
|
+
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
3
|
+
export const defaultPathSerializer = ({ path, url: _url }) => {
|
|
4
|
+
let url = _url;
|
|
5
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
6
|
+
if (matches) {
|
|
7
|
+
for (const match of matches) {
|
|
8
|
+
let explode = false;
|
|
9
|
+
let name = match.substring(1, match.length - 1);
|
|
10
|
+
let style = 'simple';
|
|
11
|
+
if (name.endsWith('*')) {
|
|
12
|
+
explode = true;
|
|
13
|
+
name = name.substring(0, name.length - 1);
|
|
14
|
+
}
|
|
15
|
+
if (name.startsWith('.')) {
|
|
16
|
+
name = name.substring(1);
|
|
17
|
+
style = 'label';
|
|
18
|
+
}
|
|
19
|
+
else if (name.startsWith(';')) {
|
|
20
|
+
name = name.substring(1);
|
|
21
|
+
style = 'matrix';
|
|
22
|
+
}
|
|
23
|
+
const value = path[name];
|
|
24
|
+
if (value === undefined || value === null) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
if (typeof value === 'object') {
|
|
32
|
+
url = url.replace(match, serializeObjectParam({
|
|
33
|
+
explode,
|
|
34
|
+
name,
|
|
35
|
+
style,
|
|
36
|
+
value: value,
|
|
37
|
+
valueOnly: true,
|
|
38
|
+
}));
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (style === 'matrix') {
|
|
42
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
43
|
+
name,
|
|
44
|
+
value: value,
|
|
45
|
+
})}`);
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
49
|
+
url = url.replace(match, replaceValue);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return url;
|
|
53
|
+
};
|
|
54
|
+
export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
55
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
56
|
+
let url = (baseUrl !== null && baseUrl !== void 0 ? baseUrl : '') + pathUrl;
|
|
57
|
+
if (path) {
|
|
58
|
+
url = defaultPathSerializer({ path, url });
|
|
59
|
+
}
|
|
60
|
+
let search = query ? querySerializer(query) : '';
|
|
61
|
+
if (search.startsWith('?')) {
|
|
62
|
+
search = search.substring(1);
|
|
63
|
+
}
|
|
64
|
+
if (search) {
|
|
65
|
+
url += `?${search}`;
|
|
66
|
+
}
|
|
67
|
+
return url;
|
|
68
|
+
};
|
|
69
|
+
export function getValidRequestBody(options) {
|
|
70
|
+
const hasBody = options.body !== undefined;
|
|
71
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
72
|
+
if (isSerializedBody) {
|
|
73
|
+
if ('serializedBody' in options) {
|
|
74
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
75
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
76
|
+
}
|
|
77
|
+
return options.body !== '' ? options.body : null;
|
|
78
|
+
}
|
|
79
|
+
if (hasBody) {
|
|
80
|
+
return options.body;
|
|
81
|
+
}
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=utils.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.gen.js","sourceRoot":"","sources":["../../../../src/client/core/utils.gen.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAO9B,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAkB,EAAE,EAAE;IAC3E,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,OAAO,EAAE,CAAC;QACZ,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAChD,IAAI,KAAK,GAAwB,QAAQ,CAAC;YAE1C,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,OAAO,GAAG,IAAI,CAAC;gBACf,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAC5C,CAAC;YAED,IAAI,I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AE,CAAC;YAChC,MAAM,iBAAiB,GACrB,OAAO,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,cAAc,KAAK,EAAE,CAAC;YAExE,OAAO,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,CAAC;QAGD,OAAO,OAAO,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;IAGD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,IAAI,CAAC;IACtB,CAAC;IAGD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { get, getRunsRuns, getRunsRunsById, type Options, postPlanPlan, postRunsPlanByIdRun } from './sdk.gen';
|
|
2
|
+
export type { ClientOptions, GetData, GetResponses, GetRunsRunsByIdData, GetRunsRunsByIdError, GetRunsRunsByIdErrors, GetRunsRunsByIdResponse, GetRunsRunsByIdResponses, GetRunsRunsData, GetRunsRunsResponse, GetRunsRunsResponses, PostPlanPlanData, PostPlanPlanResponse, PostPlanPlanResponses, PostRunsPlanByIdRunData, PostRunsPlanByIdRunError, PostRunsPlanByIdRunErrors, PostRunsPlanByIdRunResponse, PostRunsPlanByIdRunResponses } from './types.gen';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,eAAe,EAAgB,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
+
import type { GetData, GetResponses, GetRunsRunsByIdData, GetRunsRunsByIdErrors, GetRunsRunsByIdResponses, GetRunsRunsData, GetRunsRunsResponses, PostPlanPlanData, PostPlanPlanResponses, PostRunsPlanByIdRunData, PostRunsPlanByIdRunErrors, PostRunsPlanByIdRunResponses } from './types.gen';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
|
+
client?: Client;
|
|
5
|
+
meta?: Record<string, unknown>;
|
|
6
|
+
};
|
|
7
|
+
export declare const get: <ThrowOnError extends boolean = false>(options?: Options<GetData, ThrowOnError>) => import("./client").RequestResult<GetResponses, unknown, ThrowOnError, "fields">;
|
|
8
|
+
export declare const postPlanPlan: <ThrowOnError extends boolean = false>(options: Options<PostPlanPlanData, ThrowOnError>) => import("./client").RequestResult<PostPlanPlanResponses, unknown, ThrowOnError, "fields">;
|
|
9
|
+
export declare const getRunsRuns: <ThrowOnError extends boolean = false>(options: Options<GetRunsRunsData, ThrowOnError>) => import("./client").RequestResult<GetRunsRunsResponses, unknown, ThrowOnError, "fields">;
|
|
10
|
+
export declare const getRunsRunsById: <ThrowOnError extends boolean = false>(options: Options<GetRunsRunsByIdData, ThrowOnError>) => import("./client").RequestResult<GetRunsRunsByIdResponses, GetRunsRunsByIdErrors, ThrowOnError, "fields">;
|
|
11
|
+
export declare const postRunsPlanByIdRun: <ThrowOnError extends boolean = false>(options: Options<PostRunsPlanByIdRunData, ThrowOnError>) => import("./client").RequestResult<PostRunsPlanByIdRunResponses, PostRunsPlanByIdRunErrors, ThrowOnError, "fields">;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { client } from './client.gen';
|
|
2
|
+
export const get = (options) => { var _a; return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get(Object.assign({ url: '/' }, options)); };
|
|
3
|
+
export const postPlanPlan = (options) => {
|
|
4
|
+
var _a;
|
|
5
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post(Object.assign(Object.assign({ url: '/plan/plan' }, options), { headers: Object.assign({ 'Content-Type': 'application/json' }, options.headers) }));
|
|
6
|
+
};
|
|
7
|
+
export const getRunsRuns = (options) => { var _a; return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get(Object.assign({ url: '/runs/runs' }, options)); };
|
|
8
|
+
export const getRunsRunsById = (options) => { var _a; return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get(Object.assign({ url: '/runs/runs/{id}' }, options)); };
|
|
9
|
+
export const postRunsPlanByIdRun = (options) => { var _a; return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post(Object.assign({ url: '/runs/plan/{id}/run' }, options)); };
|
|
10
|
+
//# sourceMappingURL=sdk.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.gen.js","sourceRoot":"","sources":["../../../src/client/sdk.gen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAiBtC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAuC,OAAwC,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,MAAM,CAAC,CAAC,GAAG,iBAAwC,GAAG,EAAE,GAAG,IAAK,OAAO,EAAG,CAAA,EAAA,CAAC;AAEtM,MAAM,CAAC,MAAM,YAAY,GAAG,CAAuC,OAAgD,EAAE,EAAE;;IAAC,OAAA,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,MAAM,CAAC,CAAC,IAAI,+BACnJ,GAAG,EAAE,YAAY,IACd,OAAO,KACV,OAAO,kBACH,cAAc,EAAE,kBAAkB,IAC/B,OAAO,CAAC,OAAO,KAExB,CAAA;CAAA,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAuC,OAA+C,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,MAAM,CAAC,CAAC,GAAG,iBAAgD,GAAG,EAAE,YAAY,IAAK,OAAO,EAAG,CAAA,EAAA,CAAC;AAErO,MAAM,CAAC,MAAM,eAAe,GAAG,CAAuC,OAAmD,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,MAAM,CAAC,CAAC,GAAG,iBAAkE,GAAG,EAAE,iBAAiB,IAAK,OAAO,EAAG,CAAA,EAAA,CAAC;AAEpQ,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAuC,OAAuD,EAAE,EAAE,WAAC,OAAA,CAAC,MAAA,OAAO,CAAC,MAAM,mCAAI,MAAM,CAAC,CAAC,IAAI,iBAA0E,GAAG,EAAE,qBAAqB,IAAK,OAAO,EAAG,CAAA,EAAA,CAAC"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: 'http://localhost:3000' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
export type GetData = {
|
|
5
|
+
body?: never;
|
|
6
|
+
path?: never;
|
|
7
|
+
query?: never;
|
|
8
|
+
url: '/';
|
|
9
|
+
};
|
|
10
|
+
export type GetResponses = {
|
|
11
|
+
200: unknown;
|
|
12
|
+
};
|
|
13
|
+
export type PostPlanPlanData = {
|
|
14
|
+
body: {
|
|
15
|
+
organization?: string;
|
|
16
|
+
project?: string;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
version: '1.0';
|
|
20
|
+
endpoint_host: string;
|
|
21
|
+
frequency?: {
|
|
22
|
+
every: number;
|
|
23
|
+
unit: 0 | 1 | 2;
|
|
24
|
+
};
|
|
25
|
+
nodes: Array<{
|
|
26
|
+
id: string;
|
|
27
|
+
data: {
|
|
28
|
+
type: 0;
|
|
29
|
+
method: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
30
|
+
path: string;
|
|
31
|
+
headers?: {
|
|
32
|
+
[key: string]: string | {
|
|
33
|
+
$secret: {
|
|
34
|
+
provider: string;
|
|
35
|
+
ref: string;
|
|
36
|
+
version?: string;
|
|
37
|
+
field?: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
body?: unknown;
|
|
42
|
+
response_format: 0 | 1 | 2;
|
|
43
|
+
} | {
|
|
44
|
+
type: 1;
|
|
45
|
+
duration_ms: number;
|
|
46
|
+
} | {
|
|
47
|
+
type: 2;
|
|
48
|
+
assertions: Array<{
|
|
49
|
+
path: Array<string>;
|
|
50
|
+
predicate: 0 | 1 | 2 | 3 | {
|
|
51
|
+
expected: unknown;
|
|
52
|
+
operator: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
path: Array<string>;
|
|
56
|
+
expected: unknown;
|
|
57
|
+
} | {
|
|
58
|
+
path: string;
|
|
59
|
+
expected: unknown;
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
}>;
|
|
63
|
+
edges: Array<{
|
|
64
|
+
from: string;
|
|
65
|
+
to: string;
|
|
66
|
+
}>;
|
|
67
|
+
};
|
|
68
|
+
path?: never;
|
|
69
|
+
query?: never;
|
|
70
|
+
url: '/plan/plan';
|
|
71
|
+
};
|
|
72
|
+
export type PostPlanPlanResponses = {
|
|
73
|
+
201: {
|
|
74
|
+
organization?: string;
|
|
75
|
+
project?: string;
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
version: '1.0';
|
|
79
|
+
endpoint_host: string;
|
|
80
|
+
frequency?: {
|
|
81
|
+
every: number;
|
|
82
|
+
unit: 0 | 1 | 2;
|
|
83
|
+
};
|
|
84
|
+
nodes: Array<{
|
|
85
|
+
id: string;
|
|
86
|
+
data: {
|
|
87
|
+
type: 0;
|
|
88
|
+
method: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
89
|
+
path: string;
|
|
90
|
+
headers?: {
|
|
91
|
+
[key: string]: string | {
|
|
92
|
+
$secret: {
|
|
93
|
+
provider: string;
|
|
94
|
+
ref: string;
|
|
95
|
+
version?: string;
|
|
96
|
+
field?: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
body?: unknown;
|
|
101
|
+
response_format: 0 | 1 | 2;
|
|
102
|
+
} | {
|
|
103
|
+
type: 1;
|
|
104
|
+
duration_ms: number;
|
|
105
|
+
} | {
|
|
106
|
+
type: 2;
|
|
107
|
+
assertions: Array<{
|
|
108
|
+
path: Array<string>;
|
|
109
|
+
predicate: 0 | 1 | 2 | 3 | {
|
|
110
|
+
expected: unknown;
|
|
111
|
+
operator: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
112
|
+
};
|
|
113
|
+
} | {
|
|
114
|
+
path: Array<string>;
|
|
115
|
+
expected: unknown;
|
|
116
|
+
} | {
|
|
117
|
+
path: string;
|
|
118
|
+
expected: unknown;
|
|
119
|
+
}>;
|
|
120
|
+
};
|
|
121
|
+
}>;
|
|
122
|
+
edges: Array<{
|
|
123
|
+
from: string;
|
|
124
|
+
to: string;
|
|
125
|
+
}>;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
export type PostPlanPlanResponse = PostPlanPlanResponses[keyof PostPlanPlanResponses];
|
|
129
|
+
export type GetRunsRunsData = {
|
|
130
|
+
body?: never;
|
|
131
|
+
path?: never;
|
|
132
|
+
query: {
|
|
133
|
+
planId?: string;
|
|
134
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
135
|
+
limit?: number;
|
|
136
|
+
offset?: number;
|
|
137
|
+
};
|
|
138
|
+
url: '/runs/runs';
|
|
139
|
+
};
|
|
140
|
+
export type GetRunsRunsResponses = {
|
|
141
|
+
200: {
|
|
142
|
+
runs: Array<{
|
|
143
|
+
id: string;
|
|
144
|
+
planId: string;
|
|
145
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
146
|
+
triggeredBy: 'schedule' | 'manual' | 'api';
|
|
147
|
+
startedAt: string;
|
|
148
|
+
completedAt?: string;
|
|
149
|
+
duration_ms?: number;
|
|
150
|
+
success?: boolean;
|
|
151
|
+
errors?: Array<string>;
|
|
152
|
+
}>;
|
|
153
|
+
total: number;
|
|
154
|
+
limit: number;
|
|
155
|
+
offset: number;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export type GetRunsRunsResponse = GetRunsRunsResponses[keyof GetRunsRunsResponses];
|
|
159
|
+
export type GetRunsRunsByIdData = {
|
|
160
|
+
body?: never;
|
|
161
|
+
path: {
|
|
162
|
+
id: string;
|
|
163
|
+
};
|
|
164
|
+
query?: never;
|
|
165
|
+
url: '/runs/runs/{id}';
|
|
166
|
+
};
|
|
167
|
+
export type GetRunsRunsByIdErrors = {
|
|
168
|
+
404: {
|
|
169
|
+
error: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
export type GetRunsRunsByIdError = GetRunsRunsByIdErrors[keyof GetRunsRunsByIdErrors];
|
|
173
|
+
export type GetRunsRunsByIdResponses = {
|
|
174
|
+
200: {
|
|
175
|
+
id: string;
|
|
176
|
+
planId: string;
|
|
177
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
178
|
+
triggeredBy: 'schedule' | 'manual' | 'api';
|
|
179
|
+
startedAt: string;
|
|
180
|
+
completedAt?: string;
|
|
181
|
+
duration_ms?: number;
|
|
182
|
+
success?: boolean;
|
|
183
|
+
errors?: Array<string>;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
export type GetRunsRunsByIdResponse = GetRunsRunsByIdResponses[keyof GetRunsRunsByIdResponses];
|
|
187
|
+
export type PostRunsPlanByIdRunData = {
|
|
188
|
+
body?: never;
|
|
189
|
+
path: {
|
|
190
|
+
id: string;
|
|
191
|
+
};
|
|
192
|
+
query?: never;
|
|
193
|
+
url: '/runs/plan/{id}/run';
|
|
194
|
+
};
|
|
195
|
+
export type PostRunsPlanByIdRunErrors = {
|
|
196
|
+
404: {
|
|
197
|
+
error: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
export type PostRunsPlanByIdRunError = PostRunsPlanByIdRunErrors[keyof PostRunsPlanByIdRunErrors];
|
|
201
|
+
export type PostRunsPlanByIdRunResponses = {
|
|
202
|
+
200: {
|
|
203
|
+
jobRun: {
|
|
204
|
+
id: string;
|
|
205
|
+
planId: string;
|
|
206
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
207
|
+
triggeredBy: 'schedule' | 'manual' | 'api';
|
|
208
|
+
startedAt: string;
|
|
209
|
+
completedAt?: string;
|
|
210
|
+
duration_ms?: number;
|
|
211
|
+
success?: boolean;
|
|
212
|
+
errors?: Array<string>;
|
|
213
|
+
};
|
|
214
|
+
message: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
export type PostRunsPlanByIdRunResponse = PostRunsPlanByIdRunResponses[keyof PostRunsPlanByIdRunResponses];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../../../src/client/types.gen.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AssertionAnyOf
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
@@ -14,9 +14,9 @@ Name | Type | Description | Notes
|
|
|
14
14
|
## Example
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
import {
|
|
17
|
+
import { AssertionAnyOf } from 'griffin-hub-sdk';
|
|
18
18
|
|
|
19
|
-
const instance:
|
|
19
|
+
const instance: AssertionAnyOf = {
|
|
20
20
|
assertionType,
|
|
21
21
|
nodeId,
|
|
22
22
|
accessor,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AssertionAnyOf1
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
@@ -12,9 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import {
|
|
15
|
+
import { AssertionAnyOf1 } from 'griffin-hub-sdk';
|
|
16
16
|
|
|
17
|
-
const instance:
|
|
17
|
+
const instance: AssertionAnyOf1 = {
|
|
18
18
|
assertionType,
|
|
19
19
|
path,
|
|
20
20
|
expected,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AssertionAnyOf2
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
@@ -12,9 +12,9 @@ Name | Type | Description | Notes
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import {
|
|
15
|
+
import { AssertionAnyOf2 } from 'griffin-hub-sdk';
|
|
16
16
|
|
|
17
|
-
const instance:
|
|
17
|
+
const instance: AssertionAnyOf2 = {
|
|
18
18
|
assertionType,
|
|
19
19
|
path,
|
|
20
20
|
expected,
|
package/docs/Assertions.md
CHANGED
|
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
8
|
**id** | **string** | | [default to undefined]
|
|
9
9
|
**type** | **string** | | [default to undefined]
|
|
10
|
-
**assertions** | [**Array<
|
|
10
|
+
**assertions** | [**Array<AssertionsAssertionsInner>**](AssertionsAssertionsInner.md) | | [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|