agentmail 0.1.1 → 0.1.3
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/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/apiKeys/client/Client.js +52 -62
- package/dist/cjs/api/resources/domains/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/domains/client/Client.js +52 -62
- package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/drafts/client/Client.js +70 -83
- package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/client/Client.js +52 -62
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +70 -83
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +70 -83
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/client/Client.js +52 -62
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +70 -83
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/threads/client/Client.js +70 -83
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +52 -62
- package/dist/cjs/core/exports.d.ts +0 -1
- package/dist/cjs/core/exports.js +0 -1
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +0 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +52 -62
- package/dist/esm/api/resources/domains/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/domains/client/Client.mjs +52 -62
- package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/drafts/client/Client.mjs +70 -83
- package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/client/Client.mjs +52 -62
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +70 -83
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +70 -83
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/client/Client.mjs +52 -62
- package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +70 -83
- package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/threads/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/threads/client/Client.mjs +70 -83
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +52 -62
- package/dist/esm/core/exports.d.mts +0 -1
- package/dist/esm/core/exports.mjs +0 -1
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/llms-full.txt +21118 -0
- package/dist/llms.txt +101 -0
- package/package.json +2 -2
- package/reference.md +28 -196
- package/dist/cjs/core/pagination/Page.d.ts +0 -33
- package/dist/cjs/core/pagination/Page.js +0 -101
- package/dist/cjs/core/pagination/exports.d.ts +0 -1
- package/dist/cjs/core/pagination/exports.js +0 -2
- package/dist/cjs/core/pagination/index.d.ts +0 -1
- package/dist/cjs/core/pagination/index.js +0 -5
- package/dist/cjs/core/utils/index.d.ts +0 -1
- package/dist/cjs/core/utils/index.js +0 -5
- package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
- package/dist/cjs/core/utils/setObjectProperty.js +0 -42
- package/dist/esm/core/pagination/Page.d.mts +0 -33
- package/dist/esm/core/pagination/Page.mjs +0 -97
- package/dist/esm/core/pagination/exports.d.mts +0 -1
- package/dist/esm/core/pagination/exports.mjs +0 -1
- package/dist/esm/core/pagination/index.d.mts +0 -1
- package/dist/esm/core/pagination/index.mjs +0 -1
- package/dist/esm/core/utils/index.d.mts +0 -1
- package/dist/esm/core/utils/index.mjs +0 -1
- package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
- package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
12
|
-
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
13
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
14
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
15
|
-
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
16
|
-
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
17
|
-
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
18
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
19
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
20
|
-
function fulfill(value) { resume("next", value); }
|
|
21
|
-
function reject(value) { resume("throw", value); }
|
|
22
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
23
|
-
};
|
|
24
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
25
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
26
|
-
var m = o[Symbol.asyncIterator], i;
|
|
27
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
28
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
29
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
30
|
-
};
|
|
31
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.Page = void 0;
|
|
33
|
-
/**
|
|
34
|
-
* A page of results from a paginated API.
|
|
35
|
-
*
|
|
36
|
-
* @template T The type of the items in the page.
|
|
37
|
-
* @template R The type of the API response.
|
|
38
|
-
*/
|
|
39
|
-
class Page {
|
|
40
|
-
constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }) {
|
|
41
|
-
this.response = response;
|
|
42
|
-
this.rawResponse = rawResponse;
|
|
43
|
-
this.data = getItems(response);
|
|
44
|
-
this._hasNextPage = hasNextPage;
|
|
45
|
-
this.getItems = getItems;
|
|
46
|
-
this.loadNextPage = loadPage;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Retrieves the next page
|
|
50
|
-
* @returns this
|
|
51
|
-
*/
|
|
52
|
-
getNextPage() {
|
|
53
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const { data, rawResponse } = yield this.loadNextPage(this.response).withRawResponse();
|
|
55
|
-
this.response = data;
|
|
56
|
-
this.rawResponse = rawResponse;
|
|
57
|
-
this.data = this.getItems(this.response);
|
|
58
|
-
return this;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @returns whether there is a next page to load
|
|
63
|
-
*/
|
|
64
|
-
hasNextPage() {
|
|
65
|
-
return this._hasNextPage(this.response);
|
|
66
|
-
}
|
|
67
|
-
iterMessages() {
|
|
68
|
-
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
69
|
-
for (const item of this.data) {
|
|
70
|
-
yield yield __await(item);
|
|
71
|
-
}
|
|
72
|
-
while (this.hasNextPage()) {
|
|
73
|
-
yield __await(this.getNextPage());
|
|
74
|
-
for (const item of this.data) {
|
|
75
|
-
yield yield __await(item);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
[Symbol.asyncIterator]() {
|
|
81
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
82
|
-
var _b, e_1, _c, _d;
|
|
83
|
-
try {
|
|
84
|
-
for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
|
|
85
|
-
_d = _g.value;
|
|
86
|
-
_e = false;
|
|
87
|
-
const message = _d;
|
|
88
|
-
yield yield __await(message);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
92
|
-
finally {
|
|
93
|
-
try {
|
|
94
|
-
if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
|
|
95
|
-
}
|
|
96
|
-
finally { if (e_1) throw e_1.error; }
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.Page = Page;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Page } from "./Page.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Page } from "./Page.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setObjectProperty } from "./setObjectProperty.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setObjectProperty = void 0;
|
|
4
|
-
var setObjectProperty_js_1 = require("./setObjectProperty.js");
|
|
5
|
-
Object.defineProperty(exports, "setObjectProperty", { enumerable: true, get: function () { return setObjectProperty_js_1.setObjectProperty; } });
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
|
|
3
|
-
* inspired by Lodash's set function, but is simplified to accommodate our use case.
|
|
4
|
-
* For more details, see https://lodash.com/docs/4.17.15#set.
|
|
5
|
-
*
|
|
6
|
-
* @param object The object to modify.
|
|
7
|
-
* @param path The path of the property to set.
|
|
8
|
-
* @param value The value to set.
|
|
9
|
-
* @return Returns object.
|
|
10
|
-
*/
|
|
11
|
-
export declare function setObjectProperty<T extends object>(object: T, path: string, value: any): T;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setObjectProperty = setObjectProperty;
|
|
4
|
-
/**
|
|
5
|
-
* Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
|
|
6
|
-
* inspired by Lodash's set function, but is simplified to accommodate our use case.
|
|
7
|
-
* For more details, see https://lodash.com/docs/4.17.15#set.
|
|
8
|
-
*
|
|
9
|
-
* @param object The object to modify.
|
|
10
|
-
* @param path The path of the property to set.
|
|
11
|
-
* @param value The value to set.
|
|
12
|
-
* @return Returns object.
|
|
13
|
-
*/
|
|
14
|
-
function setObjectProperty(object, path, value) {
|
|
15
|
-
if (object == null) {
|
|
16
|
-
return object;
|
|
17
|
-
}
|
|
18
|
-
const keys = path.split(".");
|
|
19
|
-
if (keys.length === 0) {
|
|
20
|
-
// Invalid path; do nothing.
|
|
21
|
-
return object;
|
|
22
|
-
}
|
|
23
|
-
let current = object;
|
|
24
|
-
for (let i = 0; i < keys.length - 1; i++) {
|
|
25
|
-
const key = keys[i];
|
|
26
|
-
if (key == null) {
|
|
27
|
-
// Unreachable.
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
if (!current[key] || typeof current[key] !== "object") {
|
|
31
|
-
current[key] = {};
|
|
32
|
-
}
|
|
33
|
-
current = current[key];
|
|
34
|
-
}
|
|
35
|
-
const lastKey = keys[keys.length - 1];
|
|
36
|
-
if (lastKey == null) {
|
|
37
|
-
// Unreachable.
|
|
38
|
-
return object;
|
|
39
|
-
}
|
|
40
|
-
current[lastKey] = value;
|
|
41
|
-
return object;
|
|
42
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { HttpResponsePromise, RawResponse } from "../fetcher/index.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* A page of results from a paginated API.
|
|
4
|
-
*
|
|
5
|
-
* @template T The type of the items in the page.
|
|
6
|
-
* @template R The type of the API response.
|
|
7
|
-
*/
|
|
8
|
-
export declare class Page<T, R = unknown> implements AsyncIterable<T> {
|
|
9
|
-
data: T[];
|
|
10
|
-
rawResponse: RawResponse;
|
|
11
|
-
response: R;
|
|
12
|
-
private _hasNextPage;
|
|
13
|
-
private getItems;
|
|
14
|
-
private loadNextPage;
|
|
15
|
-
constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }: {
|
|
16
|
-
response: R;
|
|
17
|
-
rawResponse: RawResponse;
|
|
18
|
-
hasNextPage: (response: R) => boolean;
|
|
19
|
-
getItems: (response: R) => T[];
|
|
20
|
-
loadPage: (response: R) => HttpResponsePromise<R>;
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* Retrieves the next page
|
|
24
|
-
* @returns this
|
|
25
|
-
*/
|
|
26
|
-
getNextPage(): Promise<this>;
|
|
27
|
-
/**
|
|
28
|
-
* @returns whether there is a next page to load
|
|
29
|
-
*/
|
|
30
|
-
hasNextPage(): boolean;
|
|
31
|
-
private iterMessages;
|
|
32
|
-
[Symbol.asyncIterator](): AsyncIterator<T, void, any>;
|
|
33
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
|
|
11
|
-
var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
|
|
12
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
14
|
-
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
15
|
-
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
16
|
-
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
17
|
-
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
18
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
19
|
-
function fulfill(value) { resume("next", value); }
|
|
20
|
-
function reject(value) { resume("throw", value); }
|
|
21
|
-
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
22
|
-
};
|
|
23
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
24
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
25
|
-
var m = o[Symbol.asyncIterator], i;
|
|
26
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
27
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
28
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* A page of results from a paginated API.
|
|
32
|
-
*
|
|
33
|
-
* @template T The type of the items in the page.
|
|
34
|
-
* @template R The type of the API response.
|
|
35
|
-
*/
|
|
36
|
-
export class Page {
|
|
37
|
-
constructor({ response, rawResponse, hasNextPage, getItems, loadPage, }) {
|
|
38
|
-
this.response = response;
|
|
39
|
-
this.rawResponse = rawResponse;
|
|
40
|
-
this.data = getItems(response);
|
|
41
|
-
this._hasNextPage = hasNextPage;
|
|
42
|
-
this.getItems = getItems;
|
|
43
|
-
this.loadNextPage = loadPage;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves the next page
|
|
47
|
-
* @returns this
|
|
48
|
-
*/
|
|
49
|
-
getNextPage() {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const { data, rawResponse } = yield this.loadNextPage(this.response).withRawResponse();
|
|
52
|
-
this.response = data;
|
|
53
|
-
this.rawResponse = rawResponse;
|
|
54
|
-
this.data = this.getItems(this.response);
|
|
55
|
-
return this;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @returns whether there is a next page to load
|
|
60
|
-
*/
|
|
61
|
-
hasNextPage() {
|
|
62
|
-
return this._hasNextPage(this.response);
|
|
63
|
-
}
|
|
64
|
-
iterMessages() {
|
|
65
|
-
return __asyncGenerator(this, arguments, function* iterMessages_1() {
|
|
66
|
-
for (const item of this.data) {
|
|
67
|
-
yield yield __await(item);
|
|
68
|
-
}
|
|
69
|
-
while (this.hasNextPage()) {
|
|
70
|
-
yield __await(this.getNextPage());
|
|
71
|
-
for (const item of this.data) {
|
|
72
|
-
yield yield __await(item);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
[Symbol.asyncIterator]() {
|
|
78
|
-
return __asyncGenerator(this, arguments, function* _a() {
|
|
79
|
-
var _b, e_1, _c, _d;
|
|
80
|
-
try {
|
|
81
|
-
for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
|
|
82
|
-
_d = _g.value;
|
|
83
|
-
_e = false;
|
|
84
|
-
const message = _d;
|
|
85
|
-
yield yield __await(message);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
89
|
-
finally {
|
|
90
|
-
try {
|
|
91
|
-
if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
|
|
92
|
-
}
|
|
93
|
-
finally { if (e_1) throw e_1.error; }
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Page } from "./Page.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Page } from "./Page.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Page } from "./Page.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setObjectProperty } from "./setObjectProperty.mjs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { setObjectProperty } from "./setObjectProperty.mjs";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
|
|
3
|
-
* inspired by Lodash's set function, but is simplified to accommodate our use case.
|
|
4
|
-
* For more details, see https://lodash.com/docs/4.17.15#set.
|
|
5
|
-
*
|
|
6
|
-
* @param object The object to modify.
|
|
7
|
-
* @param path The path of the property to set.
|
|
8
|
-
* @param value The value to set.
|
|
9
|
-
* @return Returns object.
|
|
10
|
-
*/
|
|
11
|
-
export declare function setObjectProperty<T extends object>(object: T, path: string, value: any): T;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the value at path of object. If a portion of path doesn’t exist it’s created. This is
|
|
3
|
-
* inspired by Lodash's set function, but is simplified to accommodate our use case.
|
|
4
|
-
* For more details, see https://lodash.com/docs/4.17.15#set.
|
|
5
|
-
*
|
|
6
|
-
* @param object The object to modify.
|
|
7
|
-
* @param path The path of the property to set.
|
|
8
|
-
* @param value The value to set.
|
|
9
|
-
* @return Returns object.
|
|
10
|
-
*/
|
|
11
|
-
export function setObjectProperty(object, path, value) {
|
|
12
|
-
if (object == null) {
|
|
13
|
-
return object;
|
|
14
|
-
}
|
|
15
|
-
const keys = path.split(".");
|
|
16
|
-
if (keys.length === 0) {
|
|
17
|
-
// Invalid path; do nothing.
|
|
18
|
-
return object;
|
|
19
|
-
}
|
|
20
|
-
let current = object;
|
|
21
|
-
for (let i = 0; i < keys.length - 1; i++) {
|
|
22
|
-
const key = keys[i];
|
|
23
|
-
if (key == null) {
|
|
24
|
-
// Unreachable.
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
if (!current[key] || typeof current[key] !== "object") {
|
|
28
|
-
current[key] = {};
|
|
29
|
-
}
|
|
30
|
-
current = current[key];
|
|
31
|
-
}
|
|
32
|
-
const lastKey = keys[keys.length - 1];
|
|
33
|
-
if (lastKey == null) {
|
|
34
|
-
// Unreachable.
|
|
35
|
-
return object;
|
|
36
|
-
}
|
|
37
|
-
current[lastKey] = value;
|
|
38
|
-
return object;
|
|
39
|
-
}
|