@algolia/ingestion 1.0.0-alpha.5 → 1.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ingestion.cjs.js +18 -2
- package/dist/ingestion.esm.browser.js +33 -2
- package/dist/ingestion.esm.node.js +18 -2
- package/dist/ingestion.umd.js +2 -2
- package/dist/model/authOAuth.d.ts +1 -1
- package/dist/model/authOAuth.d.ts.map +1 -1
- package/dist/model/authentication.d.ts +0 -2
- package/dist/model/authentication.d.ts.map +1 -1
- package/dist/model/authenticationInput.d.ts +5 -0
- package/dist/model/authenticationInput.d.ts.map +1 -0
- package/dist/model/authenticationWithInput.d.ts +4 -0
- package/dist/model/authenticationWithInput.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +18 -0
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/destination.d.ts +1 -1
- package/dist/model/destination.d.ts.map +1 -1
- package/dist/model/index.d.ts +3 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/source.d.ts +1 -1
- package/dist/model/source.d.ts.map +1 -1
- package/dist/model/sourceCommercetools.d.ts +3 -0
- package/dist/model/sourceCommercetools.d.ts.map +1 -1
- package/dist/model/task.d.ts +0 -2
- package/dist/model/task.d.ts.map +1 -1
- package/dist/model/taskCreate.d.ts +2 -2
- package/dist/model/taskCreate.d.ts.map +1 -1
- package/dist/model/taskUpdate.d.ts +2 -2
- package/dist/model/taskUpdate.d.ts.map +1 -1
- package/dist/model/trigger.d.ts +9 -1
- package/dist/model/trigger.d.ts.map +1 -1
- package/dist/model/triggerInput.d.ts +6 -0
- package/dist/model/triggerInput.d.ts.map +1 -0
- package/dist/src/ingestionClient.d.ts +8 -4
- package/dist/src/ingestionClient.d.ts.map +1 -1
- package/model/authOAuth.ts +1 -1
- package/model/authentication.ts +0 -3
- package/model/authenticationInput.ts +7 -0
- package/model/authenticationWithInput.ts +6 -0
- package/model/clientMethodProps.ts +18 -0
- package/model/destination.ts +1 -1
- package/model/index.ts +3 -0
- package/model/source.ts +1 -1
- package/model/sourceCommercetools.ts +3 -0
- package/model/task.ts +0 -4
- package/model/taskCreate.ts +2 -2
- package/model/taskUpdate.ts +2 -2
- package/model/trigger.ts +11 -1
- package/model/triggerInput.ts +9 -0
- package/package.json +4 -4
package/dist/ingestion.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
6
6
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
7
|
|
|
8
8
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
9
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
9
|
+
const apiClientVersion = '1.0.0-alpha.7';
|
|
10
10
|
const REGIONS = ['us'];
|
|
11
11
|
function getDefaultHosts(region) {
|
|
12
12
|
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -623,9 +623,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
623
623
|
* @param getTasks - The getTasks object.
|
|
624
624
|
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
625
625
|
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
626
|
+
* @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
|
|
627
|
+
* @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
|
|
628
|
+
* @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
629
|
+
* @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
626
630
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
627
631
|
*/
|
|
628
|
-
getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
|
|
632
|
+
getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
|
|
629
633
|
const requestPath = '/1/tasks';
|
|
630
634
|
const headers = {};
|
|
631
635
|
const queryParameters = {};
|
|
@@ -635,6 +639,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
635
639
|
if (page !== undefined) {
|
|
636
640
|
queryParameters.page = page.toString();
|
|
637
641
|
}
|
|
642
|
+
if (action !== undefined) {
|
|
643
|
+
queryParameters.action = action.toString();
|
|
644
|
+
}
|
|
645
|
+
if (enabled !== undefined) {
|
|
646
|
+
queryParameters.enabled = enabled.toString();
|
|
647
|
+
}
|
|
648
|
+
if (destinationID !== undefined) {
|
|
649
|
+
queryParameters.destinationID = destinationID.toString();
|
|
650
|
+
}
|
|
651
|
+
if (triggerType !== undefined) {
|
|
652
|
+
queryParameters.triggerType = triggerType.toString();
|
|
653
|
+
}
|
|
638
654
|
const request = {
|
|
639
655
|
method: 'GET',
|
|
640
656
|
path: requestPath,
|
|
@@ -172,6 +172,7 @@ function createStatefulHost(host, status = 'up') {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
function _defineProperty(obj, key, value) {
|
|
175
|
+
key = _toPropertyKey(key);
|
|
175
176
|
if (key in obj) {
|
|
176
177
|
Object.defineProperty(obj, key, {
|
|
177
178
|
value: value,
|
|
@@ -184,6 +185,20 @@ function _defineProperty(obj, key, value) {
|
|
|
184
185
|
}
|
|
185
186
|
return obj;
|
|
186
187
|
}
|
|
188
|
+
function _toPrimitive(input, hint) {
|
|
189
|
+
if (typeof input !== "object" || input === null) return input;
|
|
190
|
+
var prim = input[Symbol.toPrimitive];
|
|
191
|
+
if (prim !== undefined) {
|
|
192
|
+
var res = prim.call(input, hint || "default");
|
|
193
|
+
if (typeof res !== "object") return res;
|
|
194
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
195
|
+
}
|
|
196
|
+
return (hint === "string" ? String : Number)(input);
|
|
197
|
+
}
|
|
198
|
+
function _toPropertyKey(arg) {
|
|
199
|
+
var key = _toPrimitive(arg, "string");
|
|
200
|
+
return typeof key === "symbol" ? key : String(key);
|
|
201
|
+
}
|
|
187
202
|
|
|
188
203
|
class AlgoliaError extends Error {
|
|
189
204
|
constructor(message, name) {
|
|
@@ -636,7 +651,7 @@ function createXhrRequester() {
|
|
|
636
651
|
}
|
|
637
652
|
|
|
638
653
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
639
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
654
|
+
const apiClientVersion = '1.0.0-alpha.7';
|
|
640
655
|
const REGIONS = ['us'];
|
|
641
656
|
function getDefaultHosts(region) {
|
|
642
657
|
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1253,9 +1268,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1253
1268
|
* @param getTasks - The getTasks object.
|
|
1254
1269
|
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
1255
1270
|
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
1271
|
+
* @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
|
|
1272
|
+
* @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
|
|
1273
|
+
* @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
1274
|
+
* @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
1256
1275
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1257
1276
|
*/
|
|
1258
|
-
getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
|
|
1277
|
+
getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
|
|
1259
1278
|
const requestPath = '/1/tasks';
|
|
1260
1279
|
const headers = {};
|
|
1261
1280
|
const queryParameters = {};
|
|
@@ -1265,6 +1284,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1265
1284
|
if (page !== undefined) {
|
|
1266
1285
|
queryParameters.page = page.toString();
|
|
1267
1286
|
}
|
|
1287
|
+
if (action !== undefined) {
|
|
1288
|
+
queryParameters.action = action.toString();
|
|
1289
|
+
}
|
|
1290
|
+
if (enabled !== undefined) {
|
|
1291
|
+
queryParameters.enabled = enabled.toString();
|
|
1292
|
+
}
|
|
1293
|
+
if (destinationID !== undefined) {
|
|
1294
|
+
queryParameters.destinationID = destinationID.toString();
|
|
1295
|
+
}
|
|
1296
|
+
if (triggerType !== undefined) {
|
|
1297
|
+
queryParameters.triggerType = triggerType.toString();
|
|
1298
|
+
}
|
|
1268
1299
|
const request = {
|
|
1269
1300
|
method: 'GET',
|
|
1270
1301
|
path: requestPath,
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion = '1.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '1.0.0-alpha.7';
|
|
6
6
|
const REGIONS = ['us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = 'data.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -619,9 +619,13 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
619
619
|
* @param getTasks - The getTasks object.
|
|
620
620
|
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
621
621
|
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
622
|
+
* @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
|
|
623
|
+
* @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
|
|
624
|
+
* @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
625
|
+
* @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
622
626
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
623
627
|
*/
|
|
624
|
-
getTasks({ itemsPerPage, page } = {}, requestOptions = undefined) {
|
|
628
|
+
getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, } = {}, requestOptions = undefined) {
|
|
625
629
|
const requestPath = '/1/tasks';
|
|
626
630
|
const headers = {};
|
|
627
631
|
const queryParameters = {};
|
|
@@ -631,6 +635,18 @@ function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
631
635
|
if (page !== undefined) {
|
|
632
636
|
queryParameters.page = page.toString();
|
|
633
637
|
}
|
|
638
|
+
if (action !== undefined) {
|
|
639
|
+
queryParameters.action = action.toString();
|
|
640
|
+
}
|
|
641
|
+
if (enabled !== undefined) {
|
|
642
|
+
queryParameters.enabled = enabled.toString();
|
|
643
|
+
}
|
|
644
|
+
if (destinationID !== undefined) {
|
|
645
|
+
queryParameters.destinationID = destinationID.toString();
|
|
646
|
+
}
|
|
647
|
+
if (triggerType !== undefined) {
|
|
648
|
+
queryParameters.triggerType = triggerType.toString();
|
|
649
|
+
}
|
|
634
650
|
const request = {
|
|
635
651
|
method: 'GET',
|
|
636
652
|
path: requestPath,
|
package/dist/ingestion.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! ingestion.umd.js | 1.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/ingestion"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=n()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,s={miss:()=>Promise.resolve()})=>a.get(e,n,s).catch((()=>r({caches:t}).get(e,n,s))),set:(e,n)=>a.set(e,n).catch((()=>r({caches:t}).set(e,n))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class d extends u{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class h extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function l(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let n=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(n+=`?${a}`),n}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:n,timeouts:o,requester:i,requestsCache:u,responsesCache:p}){async function g(u,p,g=!0){const P=[],w=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,p),f=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},n={};return Object.keys(a).forEach((e=>{const t=a[e];n[e.toLowerCase()]=t})),n}(r,u.headers,p.headers),q="GET"===u.method?{...u.data,...p.data}:{},I={...a,...u.queryParameters,...q};if(n.value&&(I["x-algolia-agent"]=n.value),p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?I[e]=p.queryParameters[e].toString():I[e]=p.queryParameters[e];let D=0;const y=async(e,r)=>{const a=e.pop();if(void 0===a)throw new c(function(e){return e.map((e=>m(e)))}(P));let n=p.timeout;void 0===n&&(n=g?o.read:o.write);const q={data:w,headers:f,method:u.method,url:l(a,u.path,I),connectTimeout:r(D,o.connect),responseTimeout:r(D,n)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return P.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const n=T(E);return E.isTimedOut&&D++,console.log("Retryable failure",m(n)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),y(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new h(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new d(a,t,r)}(E,P)},T=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),o=[...a,...n];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(T);return y([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:n,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return g(e,t,n);const s=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return p.get(o,(()=>u.get(o,(()=>u.set(o,s()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(o,e)})},requestsCache:u,responsesCache:p}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const P="1.0.0-alpha.5",w=["us"];e.apiClientVersion=P,e.ingestionClient=function(e,n,s,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");if(!s||s&&("string"!=typeof s||!w.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${w.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,region:n,...s}){const o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),i=p({hosts:(u=n,[{url:"data.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:{...g({algoliaAgents:a,client:"Ingestion",version:P}),value:""},baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createAuthentication(e,t){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");const r={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return i.request(r,t)},createDestination(e,t){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");const r={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return i.request(r,t)},createSource(e,t){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");const r={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return i.request(r,t)},createTask(e,t){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const r={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return i.request(r,t)},deleteAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const r={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const r={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const r={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const r={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},disableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},enableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const r={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentications({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/authentications",queryParameters:a,headers:{}};return i.request(n,r)},getDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const r={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getDestinations({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/destinations",queryParameters:a,headers:{}};return i.request(n,r)},getEvent({runID:e,eventID:t},r){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!t)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const a={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(a,r)},getEvents({runID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `runID` is required when calling `getEvents`.");const n="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getRun({runID:e},t){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");const r={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getRuns({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/runs",queryParameters:a,headers:{}};return i.request(n,r)},getRunsByTaskID({taskID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `taskID` is required when calling `getRunsByTaskID`.");const n="/1/runs/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const r={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getSources({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/sources",queryParameters:a,headers:{}};return i.request(n,r)},getTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const r={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getTasks({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/tasks",queryParameters:a,headers:{}};return i.request(n,r)},runTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},updateAuthentication({authenticationID:e,authenticationUpdate:t},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!t)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const a={method:"PUT",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateDestination({destinationID:e,destinationUpdate:t},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!t)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const a={method:"PUT",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateSource({sourceID:e,sourceUpdate:t},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!t)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const a={method:"POST",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateTask({taskID:e,taskUpdate:t},r){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!t)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const a={method:"PUT",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)}}}({appId:e,apiKey:n,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(n),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(n),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`1.0.0-alpha.5-${e}`}),a()]}),...o})}}));
|
|
1
|
+
/*! ingestion.umd.js | 1.0.0-alpha.7 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/ingestion"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function n(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=n()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=n();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,n,s={miss:()=>Promise.resolve()})=>a.get(e,n,s).catch((()=>r({caches:t}).get(e,n,s))),set:(e,n)=>a.set(e,n).catch((()=>r({caches:t}).set(e,n))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class d extends u{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class l extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let n=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(n+=`?${a}`),n}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:n,timeouts:o,requester:i,requestsCache:u,responsesCache:p}){async function g(u,p,g=!0){const P=[],f=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,p),w=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},n={};return Object.keys(a).forEach((e=>{const t=a[e];n[e.toLowerCase()]=t})),n}(r,u.headers,p.headers),I="GET"===u.method?{...u.data,...p.data}:{},q={...a,...u.queryParameters,...I};if(n.value&&(q["x-algolia-agent"]=n.value),p&&p.queryParameters)for(const e of Object.keys(p.queryParameters))p.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(p.queryParameters[e])?q[e]=p.queryParameters[e].toString():q[e]=p.queryParameters[e];let D=0;const y=async(e,r)=>{const a=e.pop();if(void 0===a)throw new c(function(e){return e.map((e=>m(e)))}(P));let n=p.timeout;void 0===n&&(n=g?o.read:o.write);const I={data:f,headers:w,method:u.method,url:h(a,u.path,q),connectTimeout:r(D,o.connect),responseTimeout:r(D,n)},v=t=>{const r={request:I,response:t,host:a,triesLeft:e.length};return P.push(r),r},T=await i.send(I);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const n=v(T);return T.isTimedOut&&D++,console.log("Retryable failure",m(n)),await t.set(a,s(a,T.isTimedOut?"timed out":"down")),y(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new l(t.message,e)}}(T);throw v(T),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new d(a,t,r)}(T,P)},v=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),T=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),n=r.filter((e=>e.isTimedOut())),o=[...a,...n];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===n.length&&0===e?1:n.length+3+e)*t}}(v);return y([...T.hosts].reverse(),T.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:n,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return g(e,t,n);const s=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return p.get(o,(()=>u.get(o,(()=>u.set(o,s()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>p.set(o,e)})},requestsCache:u,responsesCache:p}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const P="1.0.0-alpha.7",f=["us"];e.apiClientVersion=P,e.ingestionClient=function(e,n,s,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");if(!s||s&&("string"!=typeof s||!f.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${f.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,region:n,...s}){const o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),i=p({hosts:(u=n,[{url:"data.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:{...g({algoliaAgents:a,client:"Ingestion",version:P}),value:""},baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createAuthentication(e,t){if(!e)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");const r={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:e};return i.request(r,t)},createDestination(e,t){if(!e)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");const r={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:e};return i.request(r,t)},createSource(e,t){if(!e)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");const r={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:e};return i.request(r,t)},createTask(e,t){if(!e)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!e.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!e.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const r={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:e};return i.request(r,t)},deleteAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const r={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const r={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const r={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},deleteTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const r={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},disableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},enableTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentication({authenticationID:e},t){if(!e)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const r={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAuthentications({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/authentications",queryParameters:a,headers:{}};return i.request(n,r)},getDestination({destinationID:e},t){if(!e)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const r={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getDestinations({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/destinations",queryParameters:a,headers:{}};return i.request(n,r)},getEvent({runID:e,eventID:t},r){if(!e)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!t)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const a={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(e)).replace("{eventID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(a,r)},getEvents({runID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `runID` is required when calling `getEvents`.");const n="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getRun({runID:e},t){if(!e)throw new Error("Parameter `runID` is required when calling `getRun`.");const r={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getRuns({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/runs",queryParameters:a,headers:{}};return i.request(n,r)},getRunsByTaskID({taskID:e,itemsPerPage:t,page:r},a){if(!e)throw new Error("Parameter `taskID` is required when calling `getRunsByTaskID`.");const n="/1/runs/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),s={};void 0!==t&&(s.itemsPerPage=t.toString()),void 0!==r&&(s.page=r.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return i.request(o,a)},getSource({sourceID:e},t){if(!e)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const r={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getSources({itemsPerPage:e,page:t}={},r){const a={};void 0!==e&&(a.itemsPerPage=e.toString()),void 0!==t&&(a.page=t.toString());const n={method:"GET",path:"/1/sources",queryParameters:a,headers:{}};return i.request(n,r)},getTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `getTask`.");const r={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getTasks({itemsPerPage:e,page:t,action:r,enabled:a,destinationID:n,triggerType:s}={},o){const u={};void 0!==e&&(u.itemsPerPage=e.toString()),void 0!==t&&(u.page=t.toString()),void 0!==r&&(u.action=r.toString()),void 0!==a&&(u.enabled=a.toString()),void 0!==n&&(u.destinationID=n.toString()),void 0!==s&&(u.triggerType=s.toString());const c={method:"GET",path:"/1/tasks",queryParameters:u,headers:{}};return i.request(c,o)},runTask({taskID:e},t){if(!e)throw new Error("Parameter `taskID` is required when calling `runTask`.");const r={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},updateAuthentication({authenticationID:e,authenticationUpdate:t},r){if(!e)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!t)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const a={method:"PUT",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateDestination({destinationID:e,destinationUpdate:t},r){if(!e)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!t)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const a={method:"PUT",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateSource({sourceID:e,sourceUpdate:t},r){if(!e)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!t)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const a={method:"POST",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)},updateTask({taskID:e,taskUpdate:t},r){if(!e)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!t)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const a={method:"PUT",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(a,r)}}}({appId:e,apiKey:n,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(n),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(n),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`1.0.0-alpha.7-${e}`}),a()]}),...o})}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authOAuth.d.ts","sourceRoot":"","sources":["../../model/authOAuth.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IAEZ,SAAS,EAAE,MAAM,CAAC;IAElB,aAAa,EAAE,MAAM,CAAC;IAEtB,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"authOAuth.d.ts","sourceRoot":"","sources":["../../model/authOAuth.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IAEZ,SAAS,EAAE,MAAM,CAAC;IAElB,aAAa,EAAE,MAAM,CAAC;IAEtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AuthInput } from './authInput';
|
|
2
1
|
import type { AuthenticationType } from './authenticationType';
|
|
3
2
|
import type { PlatformType } from './platformType';
|
|
4
3
|
export declare type Authentication = {
|
|
@@ -6,7 +5,6 @@ export declare type Authentication = {
|
|
|
6
5
|
type: AuthenticationType;
|
|
7
6
|
name: string;
|
|
8
7
|
platform?: PlatformType;
|
|
9
|
-
input: AuthInput;
|
|
10
8
|
/**
|
|
11
9
|
* Date of creation (RFC3339 format).
|
|
12
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../model/authentication.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../model/authentication.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,cAAc,GAAG;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IAEzB,IAAI,EAAE,kBAAkB,CAAC;IAEzB,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationInput.d.ts","sourceRoot":"","sources":["../../model/authenticationInput.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,oBAAY,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authenticationWithInput.d.ts","sourceRoot":"","sources":["../../model/authenticationWithInput.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,oBAAY,uBAAuB,GAAG,cAAc,GAAG,mBAAmB,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { ActionType } from './actionType';
|
|
1
2
|
import type { AuthenticationUpdate } from './authenticationUpdate';
|
|
2
3
|
import type { DestinationUpdate } from './destinationUpdate';
|
|
3
4
|
import type { SourceUpdate } from './sourceUpdate';
|
|
4
5
|
import type { TaskUpdate } from './taskUpdate';
|
|
6
|
+
import type { TriggerType } from './triggerType';
|
|
5
7
|
/**
|
|
6
8
|
* Properties for the `deleteAuthentication` method.
|
|
7
9
|
*/
|
|
@@ -212,6 +214,22 @@ export declare type GetTasksProps = {
|
|
|
212
214
|
* The page number to fetch, starting at 1.
|
|
213
215
|
*/
|
|
214
216
|
page?: number;
|
|
217
|
+
/**
|
|
218
|
+
* Which action the returned task should have. Can be a list of string separated with commas.
|
|
219
|
+
*/
|
|
220
|
+
action?: ActionType[];
|
|
221
|
+
/**
|
|
222
|
+
* If the returned task should have its \'enabled\' property set to true.
|
|
223
|
+
*/
|
|
224
|
+
enabled?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
227
|
+
*/
|
|
228
|
+
destinationID?: string[];
|
|
229
|
+
/**
|
|
230
|
+
* Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
231
|
+
*/
|
|
232
|
+
triggerType?: TriggerType[];
|
|
215
233
|
};
|
|
216
234
|
/**
|
|
217
235
|
* Properties for the `runTask` method.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,oBAAY,yBAAyB,GAAG;IACtC;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;I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C5C,CAAC;AAEF;;GAEG;AACH,oBAAY,sBAAsB,GAAG;IACnC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../../model/destination.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,WAAW,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,eAAe,CAAC;IAEtB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../../model/destination.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,WAAW,GAAG;IACxB,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,eAAe,CAAC;IAEtB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,gBAAgB,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ export * from './authOAuth';
|
|
|
8
8
|
export * from './authentication';
|
|
9
9
|
export * from './authenticationCreate';
|
|
10
10
|
export * from './authenticationCreateResponse';
|
|
11
|
+
export * from './authenticationInput';
|
|
11
12
|
export * from './authenticationType';
|
|
12
13
|
export * from './authenticationUpdate';
|
|
13
14
|
export * from './authenticationUpdateResponse';
|
|
15
|
+
export * from './authenticationWithInput';
|
|
14
16
|
export * from './deleteResponse';
|
|
15
17
|
export * from './destination';
|
|
16
18
|
export * from './destinationCreate';
|
|
@@ -56,6 +58,7 @@ export * from './taskCreateResponse';
|
|
|
56
58
|
export * from './taskUpdate';
|
|
57
59
|
export * from './taskUpdateResponse';
|
|
58
60
|
export * from './trigger';
|
|
61
|
+
export * from './triggerInput';
|
|
59
62
|
export * from './triggerType';
|
|
60
63
|
export * from './clientMethodProps';
|
|
61
64
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,c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C;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
package/dist/model/source.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../model/source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,oBAAY,MAAM,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,UAAU,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,WAAW,CAAC;IAEnB,gBAAgB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../model/source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,oBAAY,MAAM,GAAG;IACnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,UAAU,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,WAAW,CAAC;IAEnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceCommercetools.d.ts","sourceRoot":"","sources":["../../model/sourceCommercetools.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,GAAG,EAAE,MAAM,CAAC;IAEZ,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"sourceCommercetools.d.ts","sourceRoot":"","sources":["../../model/sourceCommercetools.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB,GAAG;IAChC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,GAAG,EAAE,MAAM,CAAC;IAEZ,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/dist/model/task.d.ts
CHANGED
package/dist/model/task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../model/task.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,oBAAY,IAAI,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC;IAEjB,aAAa,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,UAAU,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../model/task.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,oBAAY,IAAI,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IAEf,QAAQ,EAAE,MAAM,CAAC;IAEjB,aAAa,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ActionType } from './actionType';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TriggerInput } from './triggerInput';
|
|
3
3
|
export declare type TaskCreate = {
|
|
4
4
|
sourceID: string;
|
|
5
5
|
destinationID: string;
|
|
6
|
-
trigger:
|
|
6
|
+
trigger: TriggerInput;
|
|
7
7
|
action: ActionType;
|
|
8
8
|
enabled?: boolean;
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskCreate.d.ts","sourceRoot":"","sources":["../../model/taskCreate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"taskCreate.d.ts","sourceRoot":"","sources":["../../model/taskCreate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IAEjB,aAAa,EAAE,MAAM,CAAC;IAEtB,OAAO,EAAE,YAAY,CAAC;IAEtB,MAAM,EAAE,UAAU,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TriggerInput } from './triggerInput';
|
|
2
2
|
export declare type TaskUpdate = {
|
|
3
3
|
destinationID?: string;
|
|
4
|
-
trigger?:
|
|
4
|
+
trigger?: TriggerInput;
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=taskUpdate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskUpdate.d.ts","sourceRoot":"","sources":["../../model/taskUpdate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"taskUpdate.d.ts","sourceRoot":"","sources":["../../model/taskUpdate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,oBAAY,UAAU,GAAG;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
package/dist/model/trigger.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { TriggerType } from './triggerType';
|
|
2
2
|
export declare type Trigger = {
|
|
3
3
|
type: TriggerType;
|
|
4
|
-
|
|
4
|
+
cron?: string;
|
|
5
|
+
/**
|
|
6
|
+
* The last time the task ran (`scheduled` or `on-demand`).
|
|
7
|
+
*/
|
|
8
|
+
lastRun?: string;
|
|
9
|
+
/**
|
|
10
|
+
* The next scheduled run for the task (`scheduled`).
|
|
11
|
+
*/
|
|
12
|
+
nextRun?: string;
|
|
5
13
|
};
|
|
6
14
|
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../model/trigger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,oBAAY,OAAO,GAAG;IACpB,IAAI,EAAE,WAAW,CAAC;IAElB,
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../model/trigger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,oBAAY,OAAO,GAAG;IACpB,IAAI,EAAE,WAAW,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggerInput.d.ts","sourceRoot":"","sources":["../../model/triggerInput.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,oBAAY,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC;IAElB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
|
-
import type { Authentication } from '../model/authentication';
|
|
3
2
|
import type { AuthenticationCreate } from '../model/authenticationCreate';
|
|
4
3
|
import type { AuthenticationCreateResponse } from '../model/authenticationCreateResponse';
|
|
5
4
|
import type { AuthenticationUpdateResponse } from '../model/authenticationUpdateResponse';
|
|
5
|
+
import type { AuthenticationWithInput } from '../model/authenticationWithInput';
|
|
6
6
|
import type { DeleteAuthenticationProps, DeleteDestinationProps, DeleteSourceProps, DeleteTaskProps, DisableTaskProps, EnableTaskProps, GetAuthenticationProps, GetAuthenticationsProps, GetDestinationProps, GetDestinationsProps, GetEventProps, GetEventsProps, GetRunProps, GetRunsProps, GetRunsByTaskIDProps, GetSourceProps, GetSourcesProps, GetTaskProps, GetTasksProps, RunTaskProps, UpdateAuthenticationProps, UpdateDestinationProps, UpdateSourceProps, UpdateTaskProps } from '../model/clientMethodProps';
|
|
7
7
|
import type { DeleteResponse } from '../model/deleteResponse';
|
|
8
8
|
import type { Destination } from '../model/destination';
|
|
@@ -26,7 +26,7 @@ import type { Task } from '../model/task';
|
|
|
26
26
|
import type { TaskCreate } from '../model/taskCreate';
|
|
27
27
|
import type { TaskCreateResponse } from '../model/taskCreateResponse';
|
|
28
28
|
import type { TaskUpdateResponse } from '../model/taskUpdateResponse';
|
|
29
|
-
export declare const apiClientVersion = "1.0.0-alpha.
|
|
29
|
+
export declare const apiClientVersion = "1.0.0-alpha.7";
|
|
30
30
|
export declare const REGIONS: readonly ["us"];
|
|
31
31
|
export declare type Region = typeof REGIONS[number];
|
|
32
32
|
export declare function createIngestionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -146,7 +146,7 @@ export declare function createIngestionClient({ appId: appIdOption, apiKey: apiK
|
|
|
146
146
|
* @param getAuthentication.authenticationID - The authentication uuid.
|
|
147
147
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
148
148
|
*/
|
|
149
|
-
getAuthentication({ authenticationID }: GetAuthenticationProps, requestOptions?: RequestOptions): Promise<
|
|
149
|
+
getAuthentication({ authenticationID }: GetAuthenticationProps, requestOptions?: RequestOptions): Promise<AuthenticationWithInput>;
|
|
150
150
|
/**
|
|
151
151
|
* Get a list of authentications.
|
|
152
152
|
*
|
|
@@ -262,9 +262,13 @@ export declare function createIngestionClient({ appId: appIdOption, apiKey: apiK
|
|
|
262
262
|
* @param getTasks - The getTasks object.
|
|
263
263
|
* @param getTasks.itemsPerPage - The number of items per page to return.
|
|
264
264
|
* @param getTasks.page - The page number to fetch, starting at 1.
|
|
265
|
+
* @param getTasks.action - Which action the returned task should have. Can be a list of string separated with commas.
|
|
266
|
+
* @param getTasks.enabled - If the returned task should have its \'enabled\' property set to true.
|
|
267
|
+
* @param getTasks.destinationID - Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
268
|
+
* @param getTasks.triggerType - Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
265
269
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
266
270
|
*/
|
|
267
|
-
getTasks({ itemsPerPage, page }?: GetTasksProps, requestOptions?: RequestOptions | undefined): Promise<ListTasksResponse>;
|
|
271
|
+
getTasks({ itemsPerPage, page, action, enabled, destinationID, triggerType, }?: GetTasksProps, requestOptions?: RequestOptions | undefined): Promise<ListTasksResponse>;
|
|
268
272
|
/**
|
|
269
273
|
* Run a task.
|
|
270
274
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestionClient.d.ts","sourceRoot":"","sources":["../../src/ingestionClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ingestionClient.d.ts","sourceRoot":"","sources":["../../src/ingestionClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,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Q,IAAI,CAAC;IAwBhB;;;;;;;;;;;;OAYG;oFASE,aAAa,mBACA,cAAc,GAAG,SAAS,GACzC,QAAQ,iBAAiB,CAAC;IAuC7B;;;;;;;OAOG;wBAEW,YAAY,mBACP,cAAc,GAC9B,QAAQ,WAAW,CAAC;IAwBvB;;;;;;;;OAQG;qEAE2C,yBAAyB,mBACpD,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;IA+BxC;;;;;;;;OAQG;4DAEqC,sBAAsB,mBAC3C,cAAc,GAC9B,QAAQ,yBAAyB,CAAC;IA+BrC;;;;;;;;OAQG;6CAE2B,iBAAiB,mBAC5B,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;IA+BhC;;;;;;;;OAQG;uCAEuB,eAAe,mBACtB,cAAc,GAC9B,QAAQ,kBAAkB,CAAC;EA+BjC;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/model/authOAuth.ts
CHANGED
package/model/authentication.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type { AuthInput } from './authInput';
|
|
4
3
|
import type { AuthenticationType } from './authenticationType';
|
|
5
4
|
import type { PlatformType } from './platformType';
|
|
6
5
|
|
|
@@ -13,8 +12,6 @@ export type Authentication = {
|
|
|
13
12
|
|
|
14
13
|
platform?: PlatformType;
|
|
15
14
|
|
|
16
|
-
input: AuthInput;
|
|
17
|
-
|
|
18
15
|
/**
|
|
19
16
|
* Date of creation (RFC3339 format).
|
|
20
17
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { Authentication } from './authentication';
|
|
4
|
+
import type { AuthenticationInput } from './authenticationInput';
|
|
5
|
+
|
|
6
|
+
export type AuthenticationWithInput = Authentication & AuthenticationInput;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
+
import type { ActionType } from './actionType';
|
|
3
4
|
import type { AuthenticationUpdate } from './authenticationUpdate';
|
|
4
5
|
import type { DestinationUpdate } from './destinationUpdate';
|
|
5
6
|
import type { SourceUpdate } from './sourceUpdate';
|
|
6
7
|
import type { TaskUpdate } from './taskUpdate';
|
|
8
|
+
import type { TriggerType } from './triggerType';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Properties for the `deleteAuthentication` method.
|
|
@@ -233,6 +235,22 @@ export type GetTasksProps = {
|
|
|
233
235
|
* The page number to fetch, starting at 1.
|
|
234
236
|
*/
|
|
235
237
|
page?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Which action the returned task should have. Can be a list of string separated with commas.
|
|
240
|
+
*/
|
|
241
|
+
action?: ActionType[];
|
|
242
|
+
/**
|
|
243
|
+
* If the returned task should have its \'enabled\' property set to true.
|
|
244
|
+
*/
|
|
245
|
+
enabled?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Which destinationID the returned task should have. Can be a list of string separated with commas.
|
|
248
|
+
*/
|
|
249
|
+
destinationID?: string[];
|
|
250
|
+
/**
|
|
251
|
+
* Which trigger type the returned task should have. Can be a list of string separated with commas.
|
|
252
|
+
*/
|
|
253
|
+
triggerType?: TriggerType[];
|
|
236
254
|
};
|
|
237
255
|
|
|
238
256
|
/**
|
package/model/destination.ts
CHANGED
package/model/index.ts
CHANGED
|
@@ -10,9 +10,11 @@ export * from './authOAuth';
|
|
|
10
10
|
export * from './authentication';
|
|
11
11
|
export * from './authenticationCreate';
|
|
12
12
|
export * from './authenticationCreateResponse';
|
|
13
|
+
export * from './authenticationInput';
|
|
13
14
|
export * from './authenticationType';
|
|
14
15
|
export * from './authenticationUpdate';
|
|
15
16
|
export * from './authenticationUpdateResponse';
|
|
17
|
+
export * from './authenticationWithInput';
|
|
16
18
|
export * from './deleteResponse';
|
|
17
19
|
export * from './destination';
|
|
18
20
|
export * from './destinationCreate';
|
|
@@ -58,5 +60,6 @@ export * from './taskCreateResponse';
|
|
|
58
60
|
export * from './taskUpdate';
|
|
59
61
|
export * from './taskUpdateResponse';
|
|
60
62
|
export * from './trigger';
|
|
63
|
+
export * from './triggerInput';
|
|
61
64
|
export * from './triggerType';
|
|
62
65
|
export * from './clientMethodProps';
|
package/model/source.ts
CHANGED
package/model/task.ts
CHANGED
package/model/taskCreate.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
3
|
import type { ActionType } from './actionType';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TriggerInput } from './triggerInput';
|
|
5
5
|
|
|
6
6
|
export type TaskCreate = {
|
|
7
7
|
sourceID: string;
|
|
8
8
|
|
|
9
9
|
destinationID: string;
|
|
10
10
|
|
|
11
|
-
trigger:
|
|
11
|
+
trigger: TriggerInput;
|
|
12
12
|
|
|
13
13
|
action: ActionType;
|
|
14
14
|
|
package/model/taskUpdate.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { TriggerInput } from './triggerInput';
|
|
4
4
|
|
|
5
5
|
export type TaskUpdate = {
|
|
6
6
|
destinationID?: string;
|
|
7
7
|
|
|
8
|
-
trigger?:
|
|
8
|
+
trigger?: TriggerInput;
|
|
9
9
|
|
|
10
10
|
enabled?: boolean;
|
|
11
11
|
};
|
package/model/trigger.ts
CHANGED
|
@@ -5,5 +5,15 @@ import type { TriggerType } from './triggerType';
|
|
|
5
5
|
export type Trigger = {
|
|
6
6
|
type: TriggerType;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
cron?: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The last time the task ran (`scheduled` or `on-demand`).
|
|
12
|
+
*/
|
|
13
|
+
lastRun?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The next scheduled run for the task (`scheduled`).
|
|
17
|
+
*/
|
|
18
|
+
nextRun?: string;
|
|
9
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/ingestion",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.7",
|
|
4
4
|
"description": "JavaScript client for ingestion",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"clean": "rm -rf ./dist || true"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
42
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
43
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
41
|
+
"@algolia/client-common": "5.0.0-alpha.33",
|
|
42
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.33",
|
|
43
|
+
"@algolia/requester-node-http": "5.0.0-alpha.33"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "16.11.59",
|