candidhealth 1.15.0 → 1.16.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/Client.d.ts +3 -0
- package/Client.js +59 -54
- package/api/resources/commons/types/BadRequestErrorMessage.d.ts +3 -0
- package/api/resources/commons/types/BadRequestErrorMessage.js +3 -0
- package/api/resources/commons/types/InternalErrorMessage.d.ts +3 -0
- package/api/resources/commons/types/InternalErrorMessage.js +3 -0
- package/api/resources/commons/types/index.d.ts +2 -0
- package/api/resources/commons/types/index.js +2 -0
- package/api/resources/events/client/Client.d.ts +14 -0
- package/api/resources/events/client/Client.js +15 -0
- package/api/resources/events/client/index.d.ts +1 -0
- package/api/resources/events/client/index.js +2 -0
- package/api/resources/events/index.d.ts +2 -0
- package/api/resources/events/index.js +18 -0
- package/api/resources/events/resources/index.d.ts +1 -0
- package/api/resources/events/resources/index.js +37 -0
- package/api/resources/events/resources/v1/client/Client.d.ts +35 -0
- package/api/resources/events/resources/v1/client/Client.js +227 -0
- package/api/resources/events/resources/v1/client/get.d.ts +37 -0
- package/api/resources/events/resources/v1/client/get.js +88 -0
- package/api/resources/events/resources/v1/client/index.d.ts +3 -0
- package/api/resources/events/resources/v1/client/index.js +42 -0
- package/api/resources/events/resources/v1/client/requests/GetEventScanRequest.d.ts +16 -0
- package/api/resources/events/resources/v1/client/requests/GetEventScanRequest.js +3 -0
- package/api/resources/events/resources/v1/client/requests/index.d.ts +1 -0
- package/api/resources/events/resources/v1/client/requests/index.js +2 -0
- package/api/resources/events/resources/v1/client/scan.d.ts +31 -0
- package/api/resources/events/resources/v1/client/scan.js +77 -0
- package/api/resources/events/resources/v1/index.d.ts +2 -0
- package/api/resources/events/resources/v1/index.js +18 -0
- package/api/resources/events/resources/v1/types/Event.d.ts +9 -0
- package/api/resources/events/resources/v1/types/Event.js +3 -0
- package/api/resources/events/resources/v1/types/EventId.d.ts +5 -0
- package/api/resources/events/resources/v1/types/EventId.js +7 -0
- package/api/resources/events/resources/v1/types/EventScanPage.d.ts +5 -0
- package/api/resources/events/resources/v1/types/EventScanPage.js +3 -0
- package/api/resources/events/resources/v1/types/index.d.ts +3 -0
- package/api/resources/events/resources/v1/types/index.js +19 -0
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +3 -2
- package/api/resources/patientAr/resources/v1/client/Client.d.ts +0 -4
- package/api/resources/patientAr/resources/v1/client/Client.js +0 -4
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +59 -54
- package/dist/api/resources/commons/types/BadRequestErrorMessage.d.ts +3 -0
- package/dist/api/resources/commons/types/BadRequestErrorMessage.js +3 -0
- package/dist/api/resources/commons/types/InternalErrorMessage.d.ts +3 -0
- package/dist/api/resources/commons/types/InternalErrorMessage.js +3 -0
- package/dist/api/resources/commons/types/index.d.ts +2 -0
- package/dist/api/resources/commons/types/index.js +2 -0
- package/dist/api/resources/events/client/Client.d.ts +14 -0
- package/dist/api/resources/events/client/Client.js +15 -0
- package/dist/api/resources/events/client/index.d.ts +1 -0
- package/dist/api/resources/events/client/index.js +2 -0
- package/dist/api/resources/events/index.d.ts +2 -0
- package/dist/api/resources/events/index.js +18 -0
- package/dist/api/resources/events/resources/index.d.ts +1 -0
- package/dist/api/resources/events/resources/index.js +37 -0
- package/dist/api/resources/events/resources/v1/client/Client.d.ts +35 -0
- package/dist/api/resources/events/resources/v1/client/Client.js +227 -0
- package/dist/api/resources/events/resources/v1/client/get.d.ts +37 -0
- package/dist/api/resources/events/resources/v1/client/get.js +88 -0
- package/dist/api/resources/events/resources/v1/client/index.d.ts +3 -0
- package/dist/api/resources/events/resources/v1/client/index.js +42 -0
- package/dist/api/resources/events/resources/v1/client/requests/GetEventScanRequest.d.ts +16 -0
- package/dist/api/resources/events/resources/v1/client/requests/GetEventScanRequest.js +3 -0
- package/dist/api/resources/events/resources/v1/client/requests/index.d.ts +1 -0
- package/dist/api/resources/events/resources/v1/client/requests/index.js +2 -0
- package/dist/api/resources/events/resources/v1/client/scan.d.ts +31 -0
- package/dist/api/resources/events/resources/v1/client/scan.js +77 -0
- package/dist/api/resources/events/resources/v1/index.d.ts +2 -0
- package/dist/api/resources/events/resources/v1/index.js +18 -0
- package/dist/api/resources/events/resources/v1/types/Event.d.ts +9 -0
- package/dist/api/resources/events/resources/v1/types/Event.js +3 -0
- package/dist/api/resources/events/resources/v1/types/EventId.d.ts +5 -0
- package/dist/api/resources/events/resources/v1/types/EventId.js +7 -0
- package/dist/api/resources/events/resources/v1/types/EventScanPage.d.ts +5 -0
- package/dist/api/resources/events/resources/v1/types/EventScanPage.js +3 -0
- package/dist/api/resources/events/resources/v1/types/index.d.ts +3 -0
- package/dist/api/resources/events/resources/v1/types/index.js +19 -0
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/patientAr/resources/v1/client/Client.d.ts +0 -4
- package/dist/api/resources/patientAr/resources/v1/client/Client.js +0 -4
- package/dist/serialization/resources/commons/types/BadRequestErrorMessage.d.ts +9 -0
- package/dist/serialization/resources/commons/types/BadRequestErrorMessage.js +41 -0
- package/dist/serialization/resources/commons/types/InternalErrorMessage.d.ts +9 -0
- package/dist/serialization/resources/commons/types/InternalErrorMessage.js +41 -0
- package/dist/serialization/resources/commons/types/index.d.ts +2 -0
- package/dist/serialization/resources/commons/types/index.js +2 -0
- package/dist/serialization/resources/events/index.d.ts +1 -0
- package/dist/serialization/resources/events/index.js +17 -0
- package/dist/serialization/resources/events/resources/index.d.ts +1 -0
- package/dist/serialization/resources/events/resources/index.js +37 -0
- package/dist/serialization/resources/events/resources/v1/client/get.d.ts +22 -0
- package/dist/serialization/resources/events/resources/v1/client/get.js +81 -0
- package/dist/serialization/resources/events/resources/v1/client/index.d.ts +2 -0
- package/dist/serialization/resources/events/resources/v1/client/index.js +38 -0
- package/dist/serialization/resources/events/resources/v1/client/scan.d.ts +17 -0
- package/dist/serialization/resources/events/resources/v1/client/scan.js +75 -0
- package/dist/serialization/resources/events/resources/v1/index.d.ts +2 -0
- package/dist/serialization/resources/events/resources/v1/index.js +18 -0
- package/dist/serialization/resources/events/resources/v1/types/Event.d.ts +15 -0
- package/dist/serialization/resources/events/resources/v1/types/Event.js +47 -0
- package/dist/serialization/resources/events/resources/v1/types/EventId.d.ts +7 -0
- package/dist/serialization/resources/events/resources/v1/types/EventId.js +43 -0
- package/dist/serialization/resources/events/resources/v1/types/EventScanPage.d.ts +12 -0
- package/dist/serialization/resources/events/resources/v1/types/EventScanPage.js +44 -0
- package/dist/serialization/resources/events/resources/v1/types/index.d.ts +3 -0
- package/dist/serialization/resources/events/resources/v1/types/index.js +19 -0
- package/dist/serialization/resources/index.d.ts +1 -0
- package/dist/serialization/resources/index.js +3 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +113 -4
- package/serialization/resources/commons/types/BadRequestErrorMessage.d.ts +9 -0
- package/serialization/resources/commons/types/BadRequestErrorMessage.js +41 -0
- package/serialization/resources/commons/types/InternalErrorMessage.d.ts +9 -0
- package/serialization/resources/commons/types/InternalErrorMessage.js +41 -0
- package/serialization/resources/commons/types/index.d.ts +2 -0
- package/serialization/resources/commons/types/index.js +2 -0
- package/serialization/resources/events/index.d.ts +1 -0
- package/serialization/resources/events/index.js +17 -0
- package/serialization/resources/events/resources/index.d.ts +1 -0
- package/serialization/resources/events/resources/index.js +37 -0
- package/serialization/resources/events/resources/v1/client/get.d.ts +22 -0
- package/serialization/resources/events/resources/v1/client/get.js +81 -0
- package/serialization/resources/events/resources/v1/client/index.d.ts +2 -0
- package/serialization/resources/events/resources/v1/client/index.js +38 -0
- package/serialization/resources/events/resources/v1/client/scan.d.ts +17 -0
- package/serialization/resources/events/resources/v1/client/scan.js +75 -0
- package/serialization/resources/events/resources/v1/index.d.ts +2 -0
- package/serialization/resources/events/resources/v1/index.js +18 -0
- package/serialization/resources/events/resources/v1/types/Event.d.ts +15 -0
- package/serialization/resources/events/resources/v1/types/Event.js +47 -0
- package/serialization/resources/events/resources/v1/types/EventId.d.ts +7 -0
- package/serialization/resources/events/resources/v1/types/EventId.js +43 -0
- package/serialization/resources/events/resources/v1/types/EventScanPage.d.ts +12 -0
- package/serialization/resources/events/resources/v1/types/EventScanPage.js +44 -0
- package/serialization/resources/events/resources/v1/types/index.d.ts +3 -0
- package/serialization/resources/events/resources/v1/types/index.js +19 -0
- package/serialization/resources/index.d.ts +1 -0
- package/serialization/resources/index.js +3 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.V1 = void 0;
|
|
47
|
+
const core = __importStar(require("../../../../../../core"));
|
|
48
|
+
const headers_1 = require("../../../../../../core/headers");
|
|
49
|
+
const environments = __importStar(require("../../../../../../environments"));
|
|
50
|
+
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
51
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
52
|
+
class V1 {
|
|
53
|
+
constructor(_options = {}) {
|
|
54
|
+
this._options = _options;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Scans the last 30 days of events. All results are sorted by created date, descending.
|
|
58
|
+
*
|
|
59
|
+
* @param {CandidApi.events.v1.GetEventScanRequest} request
|
|
60
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* await client.events.v1.scan()
|
|
64
|
+
*/
|
|
65
|
+
scan(request = {}, requestOptions) {
|
|
66
|
+
return core.HttpResponsePromise.fromPromise(this.__scan(request, requestOptions));
|
|
67
|
+
}
|
|
68
|
+
__scan() {
|
|
69
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
70
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
71
|
+
const { pageToken, limit, eventTypes, createdBefore, createdAfter } = request;
|
|
72
|
+
const _queryParams = {};
|
|
73
|
+
if (pageToken != null) {
|
|
74
|
+
_queryParams.page_token = pageToken;
|
|
75
|
+
}
|
|
76
|
+
if (limit != null) {
|
|
77
|
+
_queryParams.limit = limit.toString();
|
|
78
|
+
}
|
|
79
|
+
if (eventTypes != null) {
|
|
80
|
+
if (Array.isArray(eventTypes)) {
|
|
81
|
+
_queryParams.event_types = eventTypes.map((item) => item);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
_queryParams.event_types = eventTypes;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (createdBefore != null) {
|
|
88
|
+
_queryParams.created_before = createdBefore.toISOString();
|
|
89
|
+
}
|
|
90
|
+
if (createdAfter != null) {
|
|
91
|
+
_queryParams.created_after = createdAfter.toISOString();
|
|
92
|
+
}
|
|
93
|
+
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
94
|
+
const _response = yield core.fetcher({
|
|
95
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, "/api/events/v1/"),
|
|
96
|
+
method: "GET",
|
|
97
|
+
headers: _headers,
|
|
98
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
99
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
100
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
101
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
102
|
+
});
|
|
103
|
+
if (_response.ok) {
|
|
104
|
+
return {
|
|
105
|
+
data: {
|
|
106
|
+
ok: true,
|
|
107
|
+
body: serializers.events.v1.EventScanPage.parseOrThrow(_response.body, {
|
|
108
|
+
unrecognizedObjectKeys: "passthrough",
|
|
109
|
+
allowUnrecognizedUnionMembers: true,
|
|
110
|
+
allowUnrecognizedEnumValues: true,
|
|
111
|
+
breadcrumbsPrefix: ["response"],
|
|
112
|
+
}),
|
|
113
|
+
headers: _response.headers,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
},
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (_response.error.reason === "status-code") {
|
|
120
|
+
switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
|
|
121
|
+
case "BadRequestError":
|
|
122
|
+
case "InternalError":
|
|
123
|
+
return {
|
|
124
|
+
data: {
|
|
125
|
+
ok: false,
|
|
126
|
+
error: serializers.events.v1.scan.Error.parseOrThrow(_response.error.body, {
|
|
127
|
+
unrecognizedObjectKeys: "passthrough",
|
|
128
|
+
allowUnrecognizedUnionMembers: true,
|
|
129
|
+
allowUnrecognizedEnumValues: true,
|
|
130
|
+
breadcrumbsPrefix: ["response"],
|
|
131
|
+
}),
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
},
|
|
134
|
+
rawResponse: _response.rawResponse,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
data: {
|
|
140
|
+
ok: false,
|
|
141
|
+
error: CandidApi.events.v1.scan.Error._unknown(_response.error),
|
|
142
|
+
rawResponse: _response.rawResponse,
|
|
143
|
+
},
|
|
144
|
+
rawResponse: _response.rawResponse,
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* @param {CandidApi.events.v1.EventId} eventId
|
|
150
|
+
* @param {V1.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* await client.events.v1.get(CandidApi.events.v1.EventId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"))
|
|
154
|
+
*/
|
|
155
|
+
get(eventId, requestOptions) {
|
|
156
|
+
return core.HttpResponsePromise.fromPromise(this.__get(eventId, requestOptions));
|
|
157
|
+
}
|
|
158
|
+
__get(eventId, requestOptions) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
161
|
+
const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
162
|
+
const _response = yield core.fetcher({
|
|
163
|
+
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/events/v1/${core.url.encodePathParam(serializers.events.v1.EventId.jsonOrThrow(eventId))}`),
|
|
164
|
+
method: "GET",
|
|
165
|
+
headers: _headers,
|
|
166
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
168
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
169
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
170
|
+
});
|
|
171
|
+
if (_response.ok) {
|
|
172
|
+
return {
|
|
173
|
+
data: {
|
|
174
|
+
ok: true,
|
|
175
|
+
body: serializers.events.v1.Event.parseOrThrow(_response.body, {
|
|
176
|
+
unrecognizedObjectKeys: "passthrough",
|
|
177
|
+
allowUnrecognizedUnionMembers: true,
|
|
178
|
+
allowUnrecognizedEnumValues: true,
|
|
179
|
+
breadcrumbsPrefix: ["response"],
|
|
180
|
+
}),
|
|
181
|
+
headers: _response.headers,
|
|
182
|
+
rawResponse: _response.rawResponse,
|
|
183
|
+
},
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
if (_response.error.reason === "status-code") {
|
|
188
|
+
switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
|
|
189
|
+
case "BadRequestError":
|
|
190
|
+
case "InternalError":
|
|
191
|
+
case "EntityNotFoundError":
|
|
192
|
+
return {
|
|
193
|
+
data: {
|
|
194
|
+
ok: false,
|
|
195
|
+
error: serializers.events.v1.get.Error.parseOrThrow(_response.error.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
breadcrumbsPrefix: ["response"],
|
|
200
|
+
}),
|
|
201
|
+
rawResponse: _response.rawResponse,
|
|
202
|
+
},
|
|
203
|
+
rawResponse: _response.rawResponse,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
data: {
|
|
209
|
+
ok: false,
|
|
210
|
+
error: CandidApi.events.v1.get.Error._unknown(_response.error),
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
},
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
_getAuthorizationHeader() {
|
|
218
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
219
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
220
|
+
if (bearer != null) {
|
|
221
|
+
return `Bearer ${bearer}`;
|
|
222
|
+
}
|
|
223
|
+
return undefined;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.V1 = V1;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type * as core from "../../../../../../core";
|
|
2
|
+
import * as CandidApi from "../../../../../index";
|
|
3
|
+
export type Error = CandidApi.events.v1.get.Error.BadRequestError | CandidApi.events.v1.get.Error.InternalError | CandidApi.events.v1.get.Error.EntityNotFoundError | CandidApi.events.v1.get.Error._Unknown;
|
|
4
|
+
export declare namespace Error {
|
|
5
|
+
interface BadRequestError extends _Utils {
|
|
6
|
+
errorName: "BadRequestError";
|
|
7
|
+
content: CandidApi.BadRequestErrorMessage;
|
|
8
|
+
}
|
|
9
|
+
interface InternalError extends _Utils {
|
|
10
|
+
errorName: "InternalError";
|
|
11
|
+
content: CandidApi.InternalErrorMessage;
|
|
12
|
+
}
|
|
13
|
+
interface EntityNotFoundError extends _Utils {
|
|
14
|
+
errorName: "EntityNotFoundError";
|
|
15
|
+
content: CandidApi.EntityNotFoundErrorMessage;
|
|
16
|
+
}
|
|
17
|
+
interface _Unknown extends _Utils {
|
|
18
|
+
errorName: void;
|
|
19
|
+
content: core.Fetcher.Error;
|
|
20
|
+
}
|
|
21
|
+
interface _Utils {
|
|
22
|
+
_visit: <_Result>(visitor: CandidApi.events.v1.get.Error._Visitor<_Result>) => _Result;
|
|
23
|
+
}
|
|
24
|
+
interface _Visitor<_Result> {
|
|
25
|
+
badRequestError: (value: CandidApi.BadRequestErrorMessage) => _Result;
|
|
26
|
+
internalError: (value: CandidApi.InternalErrorMessage) => _Result;
|
|
27
|
+
entityNotFoundError: (value: CandidApi.EntityNotFoundErrorMessage) => _Result;
|
|
28
|
+
_other: (value: core.Fetcher.Error) => _Result;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export declare const Error: {
|
|
32
|
+
readonly badRequestError: (value: CandidApi.BadRequestErrorMessage) => CandidApi.events.v1.get.Error.BadRequestError;
|
|
33
|
+
readonly internalError: (value: CandidApi.InternalErrorMessage) => CandidApi.events.v1.get.Error.InternalError;
|
|
34
|
+
readonly entityNotFoundError: (value: CandidApi.EntityNotFoundErrorMessage) => CandidApi.events.v1.get.Error.EntityNotFoundError;
|
|
35
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.events.v1.get.Error._Unknown;
|
|
36
|
+
readonly _visit: <_Result>(value: CandidApi.events.v1.get.Error, visitor: CandidApi.events.v1.get.Error._Visitor<_Result>) => _Result;
|
|
37
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.Error = void 0;
|
|
38
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
39
|
+
exports.Error = {
|
|
40
|
+
badRequestError: (value) => {
|
|
41
|
+
return {
|
|
42
|
+
content: value,
|
|
43
|
+
errorName: "BadRequestError",
|
|
44
|
+
_visit: function (visitor) {
|
|
45
|
+
return CandidApi.events.v1.get.Error._visit(this, visitor);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
internalError: (value) => {
|
|
50
|
+
return {
|
|
51
|
+
content: value,
|
|
52
|
+
errorName: "InternalError",
|
|
53
|
+
_visit: function (visitor) {
|
|
54
|
+
return CandidApi.events.v1.get.Error._visit(this, visitor);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
entityNotFoundError: (value) => {
|
|
59
|
+
return {
|
|
60
|
+
content: value,
|
|
61
|
+
errorName: "EntityNotFoundError",
|
|
62
|
+
_visit: function (visitor) {
|
|
63
|
+
return CandidApi.events.v1.get.Error._visit(this, visitor);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
_unknown: (fetcherError) => {
|
|
68
|
+
return {
|
|
69
|
+
errorName: undefined,
|
|
70
|
+
content: fetcherError,
|
|
71
|
+
_visit: function (visitor) {
|
|
72
|
+
return CandidApi.events.v1.get.Error._visit(this, visitor);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
_visit: (value, visitor) => {
|
|
77
|
+
switch (value.errorName) {
|
|
78
|
+
case "BadRequestError":
|
|
79
|
+
return visitor.badRequestError(value.content);
|
|
80
|
+
case "InternalError":
|
|
81
|
+
return visitor.internalError(value.content);
|
|
82
|
+
case "EntityNotFoundError":
|
|
83
|
+
return visitor.entityNotFoundError(value.content);
|
|
84
|
+
default:
|
|
85
|
+
return visitor._other(value);
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.scan = exports.get = void 0;
|
|
40
|
+
exports.get = __importStar(require("./get"));
|
|
41
|
+
__exportStar(require("./requests"), exports);
|
|
42
|
+
exports.scan = __importStar(require("./scan"));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as CandidApi from "../../../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface GetEventScanRequest {
|
|
7
|
+
pageToken?: CandidApi.PageToken;
|
|
8
|
+
/** Number of events to return. Minimum value is 1, maximum is 100. Defaults to 10. */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Event types to filter on. Defaults to showing all event types. */
|
|
11
|
+
eventTypes?: string | string[];
|
|
12
|
+
/** Filters for only events created before this time (inclusive). */
|
|
13
|
+
createdBefore?: Date;
|
|
14
|
+
/** Filters for only events created after this time (inclusive). */
|
|
15
|
+
createdAfter?: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { GetEventScanRequest } from "./GetEventScanRequest";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as core from "../../../../../../core";
|
|
2
|
+
import * as CandidApi from "../../../../../index";
|
|
3
|
+
export type Error = CandidApi.events.v1.scan.Error.BadRequestError | CandidApi.events.v1.scan.Error.InternalError | CandidApi.events.v1.scan.Error._Unknown;
|
|
4
|
+
export declare namespace Error {
|
|
5
|
+
interface BadRequestError extends _Utils {
|
|
6
|
+
errorName: "BadRequestError";
|
|
7
|
+
content: CandidApi.BadRequestErrorMessage;
|
|
8
|
+
}
|
|
9
|
+
interface InternalError extends _Utils {
|
|
10
|
+
errorName: "InternalError";
|
|
11
|
+
content: CandidApi.InternalErrorMessage;
|
|
12
|
+
}
|
|
13
|
+
interface _Unknown extends _Utils {
|
|
14
|
+
errorName: void;
|
|
15
|
+
content: core.Fetcher.Error;
|
|
16
|
+
}
|
|
17
|
+
interface _Utils {
|
|
18
|
+
_visit: <_Result>(visitor: CandidApi.events.v1.scan.Error._Visitor<_Result>) => _Result;
|
|
19
|
+
}
|
|
20
|
+
interface _Visitor<_Result> {
|
|
21
|
+
badRequestError: (value: CandidApi.BadRequestErrorMessage) => _Result;
|
|
22
|
+
internalError: (value: CandidApi.InternalErrorMessage) => _Result;
|
|
23
|
+
_other: (value: core.Fetcher.Error) => _Result;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare const Error: {
|
|
27
|
+
readonly badRequestError: (value: CandidApi.BadRequestErrorMessage) => CandidApi.events.v1.scan.Error.BadRequestError;
|
|
28
|
+
readonly internalError: (value: CandidApi.InternalErrorMessage) => CandidApi.events.v1.scan.Error.InternalError;
|
|
29
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.events.v1.scan.Error._Unknown;
|
|
30
|
+
readonly _visit: <_Result>(value: CandidApi.events.v1.scan.Error, visitor: CandidApi.events.v1.scan.Error._Visitor<_Result>) => _Result;
|
|
31
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.Error = void 0;
|
|
38
|
+
const CandidApi = __importStar(require("../../../../../index"));
|
|
39
|
+
exports.Error = {
|
|
40
|
+
badRequestError: (value) => {
|
|
41
|
+
return {
|
|
42
|
+
content: value,
|
|
43
|
+
errorName: "BadRequestError",
|
|
44
|
+
_visit: function (visitor) {
|
|
45
|
+
return CandidApi.events.v1.scan.Error._visit(this, visitor);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
internalError: (value) => {
|
|
50
|
+
return {
|
|
51
|
+
content: value,
|
|
52
|
+
errorName: "InternalError",
|
|
53
|
+
_visit: function (visitor) {
|
|
54
|
+
return CandidApi.events.v1.scan.Error._visit(this, visitor);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
_unknown: (fetcherError) => {
|
|
59
|
+
return {
|
|
60
|
+
errorName: undefined,
|
|
61
|
+
content: fetcherError,
|
|
62
|
+
_visit: function (visitor) {
|
|
63
|
+
return CandidApi.events.v1.scan.Error._visit(this, visitor);
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
_visit: (value, visitor) => {
|
|
68
|
+
switch (value.errorName) {
|
|
69
|
+
case "BadRequestError":
|
|
70
|
+
return visitor.badRequestError(value.content);
|
|
71
|
+
case "InternalError":
|
|
72
|
+
return visitor.internalError(value.content);
|
|
73
|
+
default:
|
|
74
|
+
return visitor._other(value);
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Event"), exports);
|
|
18
|
+
__exportStar(require("./EventId"), exports);
|
|
19
|
+
__exportStar(require("./EventScanPage"), exports);
|
|
@@ -22,6 +22,7 @@ export * as encounters from "./encounters";
|
|
|
22
22
|
export * as encountersUniversal from "./encountersUniversal";
|
|
23
23
|
export * as era from "./era";
|
|
24
24
|
export * from "./era/types";
|
|
25
|
+
export * as events from "./events";
|
|
25
26
|
export * as expectedNetworkStatus from "./expectedNetworkStatus";
|
|
26
27
|
export * as exports from "./exports";
|
|
27
28
|
export * as externalPaymentAccountConfig from "./externalPaymentAccountConfig";
|