@primitivedotdev/sdk 1.14.3 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +3 -3
- package/dist/{api-Dult2Jxz.js → api-BkhWsqoq.js} +287 -1
- package/dist/{index-Cpoj4cZf.d.ts → index-ClyWLBZf.d.ts} +1237 -149
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-KejSwZWN.js → operations.generated-CORS0UoM.js} +3839 -1372
- package/package.json +1 -1
|
@@ -626,6 +626,8 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
626
626
|
createOrgSecret: () => createOrgSecret,
|
|
627
627
|
createRegistry: () => createRegistry,
|
|
628
628
|
createRoute: () => createRoute,
|
|
629
|
+
createWakeAuthorization: () => createWakeAuthorization,
|
|
630
|
+
createWakeSchedule: () => createWakeSchedule,
|
|
629
631
|
decideRegistryRequest: () => decideRegistryRequest,
|
|
630
632
|
defineAgent: () => defineAgent,
|
|
631
633
|
deleteDomain: () => deleteDomain,
|
|
@@ -634,8 +636,12 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
634
636
|
deleteFilter: () => deleteFilter,
|
|
635
637
|
deleteFunction: () => deleteFunction,
|
|
636
638
|
deleteFunctionSecret: () => deleteFunctionSecret,
|
|
639
|
+
deleteMemory: () => deleteMemory,
|
|
637
640
|
deleteOrgSecret: () => deleteOrgSecret,
|
|
641
|
+
deleteRegistry: () => deleteRegistry,
|
|
638
642
|
deleteRoute: () => deleteRoute,
|
|
643
|
+
deleteWakeAuthorization: () => deleteWakeAuthorization,
|
|
644
|
+
deleteWakeSchedule: () => deleteWakeSchedule,
|
|
639
645
|
discardEmailContent: () => discardEmailContent,
|
|
640
646
|
downloadAttachments: () => downloadAttachments,
|
|
641
647
|
downloadDomainZoneFile: () => downloadDomainZoneFile,
|
|
@@ -649,6 +655,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
649
655
|
getFunctionRouting: () => getFunctionRouting,
|
|
650
656
|
getFunctionTestRunTrace: () => getFunctionTestRunTrace,
|
|
651
657
|
getInboxStatus: () => getInboxStatus,
|
|
658
|
+
getMemory: () => getMemory,
|
|
652
659
|
getOrgRoutingTopology: () => getOrgRoutingTopology,
|
|
653
660
|
getRegistry: () => getRegistry,
|
|
654
661
|
getSendPermissions: () => getSendPermissions,
|
|
@@ -656,6 +663,7 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
656
663
|
getSpendPolicy: () => getSpendPolicy,
|
|
657
664
|
getStorageStats: () => getStorageStats,
|
|
658
665
|
getThread: () => getThread,
|
|
666
|
+
getWakeSchedule: () => getWakeSchedule,
|
|
659
667
|
getWebhookSecret: () => getWebhookSecret,
|
|
660
668
|
listDeclinedPayments: () => listDeclinedPayments,
|
|
661
669
|
listDeliveries: () => listDeliveries,
|
|
@@ -673,6 +681,9 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
673
681
|
listRegistryRequests: () => listRegistryRequests,
|
|
674
682
|
listRoutes: () => listRoutes,
|
|
675
683
|
listSentEmails: () => listSentEmails,
|
|
684
|
+
listWakeAuthorizations: () => listWakeAuthorizations,
|
|
685
|
+
listWakeDispatches: () => listWakeDispatches,
|
|
686
|
+
listWakeSchedules: () => listWakeSchedules,
|
|
676
687
|
payChallenge: () => payChallenge,
|
|
677
688
|
pollCliLogin: () => pollCliLogin,
|
|
678
689
|
publishAgent: () => publishAgent,
|
|
@@ -685,11 +696,14 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
685
696
|
resendCliSignupVerification: () => resendCliSignupVerification,
|
|
686
697
|
resolveRegistryHandle: () => resolveRegistryHandle,
|
|
687
698
|
rotateWebhookSecret: () => rotateWebhookSecret,
|
|
699
|
+
runWakeSchedule: () => runWakeSchedule,
|
|
688
700
|
searchEmails: () => searchEmails,
|
|
701
|
+
searchMemories: () => searchMemories,
|
|
689
702
|
semanticSearch: () => semanticSearch,
|
|
690
703
|
sendEmail: () => sendEmail,
|
|
691
704
|
setFunctionRoute: () => setFunctionRoute,
|
|
692
705
|
setFunctionSecret: () => setFunctionSecret,
|
|
706
|
+
setMemory: () => setMemory,
|
|
693
707
|
setOrgSecret: () => setOrgSecret,
|
|
694
708
|
simulateRoute: () => simulateRoute,
|
|
695
709
|
startAgentClaim: () => startAgentClaim,
|
|
@@ -708,6 +722,8 @@ var sdk_gen_exports = /* @__PURE__ */ __exportAll({
|
|
|
708
722
|
updateRegistry: () => updateRegistry,
|
|
709
723
|
updateRoute: () => updateRoute,
|
|
710
724
|
updateSpendPolicy: () => updateSpendPolicy,
|
|
725
|
+
updateWakeAuthorization: () => updateWakeAuthorization,
|
|
726
|
+
updateWakeSchedule: () => updateWakeSchedule,
|
|
711
727
|
verifyAgentClaim: () => verifyAgentClaim,
|
|
712
728
|
verifyAgentSignup: () => verifyAgentSignup,
|
|
713
729
|
verifyCliSignup: () => verifyCliSignup,
|
|
@@ -1574,6 +1590,172 @@ const updateFilter = (options) => (options.client ?? client$1).patch({
|
|
|
1574
1590
|
}
|
|
1575
1591
|
});
|
|
1576
1592
|
/**
|
|
1593
|
+
* List wake schedules
|
|
1594
|
+
*
|
|
1595
|
+
* Returns the org's wake.dispatch schedules.
|
|
1596
|
+
*/
|
|
1597
|
+
const listWakeSchedules = (options) => (options?.client ?? client$1).get({
|
|
1598
|
+
security: [{
|
|
1599
|
+
scheme: "bearer",
|
|
1600
|
+
type: "http"
|
|
1601
|
+
}],
|
|
1602
|
+
url: "/wake/schedules",
|
|
1603
|
+
...options
|
|
1604
|
+
});
|
|
1605
|
+
/**
|
|
1606
|
+
* Create a wake schedule
|
|
1607
|
+
*
|
|
1608
|
+
* Create a cron schedule that sends a wake.dispatch command to one of your
|
|
1609
|
+
* own function addresses. `from` and `to` must differ (no self-dispatch);
|
|
1610
|
+
* the cron expression and IANA timezone are validated and the first fire
|
|
1611
|
+
* time is computed without firing immediately.
|
|
1612
|
+
*
|
|
1613
|
+
*/
|
|
1614
|
+
const createWakeSchedule = (options) => (options.client ?? client$1).post({
|
|
1615
|
+
security: [{
|
|
1616
|
+
scheme: "bearer",
|
|
1617
|
+
type: "http"
|
|
1618
|
+
}],
|
|
1619
|
+
url: "/wake/schedules",
|
|
1620
|
+
...options,
|
|
1621
|
+
headers: {
|
|
1622
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1623
|
+
...options.headers
|
|
1624
|
+
}
|
|
1625
|
+
});
|
|
1626
|
+
/**
|
|
1627
|
+
* Delete a wake schedule
|
|
1628
|
+
*/
|
|
1629
|
+
const deleteWakeSchedule = (options) => (options.client ?? client$1).delete({
|
|
1630
|
+
security: [{
|
|
1631
|
+
scheme: "bearer",
|
|
1632
|
+
type: "http"
|
|
1633
|
+
}],
|
|
1634
|
+
url: "/wake/schedules/{id}",
|
|
1635
|
+
...options
|
|
1636
|
+
});
|
|
1637
|
+
/**
|
|
1638
|
+
* Get a wake schedule
|
|
1639
|
+
*/
|
|
1640
|
+
const getWakeSchedule = (options) => (options.client ?? client$1).get({
|
|
1641
|
+
security: [{
|
|
1642
|
+
scheme: "bearer",
|
|
1643
|
+
type: "http"
|
|
1644
|
+
}],
|
|
1645
|
+
url: "/wake/schedules/{id}",
|
|
1646
|
+
...options
|
|
1647
|
+
});
|
|
1648
|
+
/**
|
|
1649
|
+
* Update a wake schedule
|
|
1650
|
+
*
|
|
1651
|
+
* Update a schedule's command, args, cadence, addresses, note, or enabled
|
|
1652
|
+
* state. Changing the cadence (or re-enabling) recomputes the next fire time.
|
|
1653
|
+
*
|
|
1654
|
+
*/
|
|
1655
|
+
const updateWakeSchedule = (options) => (options.client ?? client$1).patch({
|
|
1656
|
+
security: [{
|
|
1657
|
+
scheme: "bearer",
|
|
1658
|
+
type: "http"
|
|
1659
|
+
}],
|
|
1660
|
+
url: "/wake/schedules/{id}",
|
|
1661
|
+
...options,
|
|
1662
|
+
headers: {
|
|
1663
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1664
|
+
...options.headers
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1667
|
+
/**
|
|
1668
|
+
* Run a wake schedule now
|
|
1669
|
+
*
|
|
1670
|
+
* Fire the schedule immediately, sending one wake.dispatch via the same
|
|
1671
|
+
* signed-send path as a scheduled fire. Does not change the schedule's next
|
|
1672
|
+
* fire time.
|
|
1673
|
+
*
|
|
1674
|
+
*/
|
|
1675
|
+
const runWakeSchedule = (options) => (options.client ?? client$1).post({
|
|
1676
|
+
security: [{
|
|
1677
|
+
scheme: "bearer",
|
|
1678
|
+
type: "http"
|
|
1679
|
+
}],
|
|
1680
|
+
url: "/wake/schedules/{id}/run",
|
|
1681
|
+
...options
|
|
1682
|
+
});
|
|
1683
|
+
/**
|
|
1684
|
+
* List wake authorizations
|
|
1685
|
+
*
|
|
1686
|
+
* Returns the per-target allowlist grants that authorize which senders may
|
|
1687
|
+
* wake a function. Optionally filter by the target endpoint.
|
|
1688
|
+
*
|
|
1689
|
+
*/
|
|
1690
|
+
const listWakeAuthorizations = (options) => (options?.client ?? client$1).get({
|
|
1691
|
+
security: [{
|
|
1692
|
+
scheme: "bearer",
|
|
1693
|
+
type: "http"
|
|
1694
|
+
}],
|
|
1695
|
+
url: "/wake/authorizations",
|
|
1696
|
+
...options
|
|
1697
|
+
});
|
|
1698
|
+
/**
|
|
1699
|
+
* Create a wake authorization
|
|
1700
|
+
*
|
|
1701
|
+
* Grant a sender domain (and optionally a specific address and command set)
|
|
1702
|
+
* permission to wake a target function. The domain must be fully-qualified.
|
|
1703
|
+
*
|
|
1704
|
+
*/
|
|
1705
|
+
const createWakeAuthorization = (options) => (options.client ?? client$1).post({
|
|
1706
|
+
security: [{
|
|
1707
|
+
scheme: "bearer",
|
|
1708
|
+
type: "http"
|
|
1709
|
+
}],
|
|
1710
|
+
url: "/wake/authorizations",
|
|
1711
|
+
...options,
|
|
1712
|
+
headers: {
|
|
1713
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1714
|
+
...options.headers
|
|
1715
|
+
}
|
|
1716
|
+
});
|
|
1717
|
+
/**
|
|
1718
|
+
* Delete a wake authorization
|
|
1719
|
+
*/
|
|
1720
|
+
const deleteWakeAuthorization = (options) => (options.client ?? client$1).delete({
|
|
1721
|
+
security: [{
|
|
1722
|
+
scheme: "bearer",
|
|
1723
|
+
type: "http"
|
|
1724
|
+
}],
|
|
1725
|
+
url: "/wake/authorizations/{id}",
|
|
1726
|
+
...options
|
|
1727
|
+
});
|
|
1728
|
+
/**
|
|
1729
|
+
* Update a wake authorization
|
|
1730
|
+
*
|
|
1731
|
+
* Toggle a wake authorization's enabled state.
|
|
1732
|
+
*/
|
|
1733
|
+
const updateWakeAuthorization = (options) => (options.client ?? client$1).patch({
|
|
1734
|
+
security: [{
|
|
1735
|
+
scheme: "bearer",
|
|
1736
|
+
type: "http"
|
|
1737
|
+
}],
|
|
1738
|
+
url: "/wake/authorizations/{id}",
|
|
1739
|
+
...options,
|
|
1740
|
+
headers: {
|
|
1741
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
1742
|
+
...options.headers
|
|
1743
|
+
}
|
|
1744
|
+
});
|
|
1745
|
+
/**
|
|
1746
|
+
* List recent wake dispatches
|
|
1747
|
+
*
|
|
1748
|
+
* Read-only audit of recent wake.dispatch interactions for the org.
|
|
1749
|
+
*/
|
|
1750
|
+
const listWakeDispatches = (options) => (options?.client ?? client$1).get({
|
|
1751
|
+
security: [{
|
|
1752
|
+
scheme: "bearer",
|
|
1753
|
+
type: "http"
|
|
1754
|
+
}],
|
|
1755
|
+
url: "/wake/dispatches",
|
|
1756
|
+
...options
|
|
1757
|
+
});
|
|
1758
|
+
/**
|
|
1577
1759
|
* List recipient routes
|
|
1578
1760
|
*
|
|
1579
1761
|
* Returns the org's recipient routing rules in evaluation order. Each rule
|
|
@@ -2338,6 +2520,97 @@ const listFunctionLogs = (options) => (options.client ?? client$1).get({
|
|
|
2338
2520
|
...options
|
|
2339
2521
|
});
|
|
2340
2522
|
/**
|
|
2523
|
+
* Delete a memory
|
|
2524
|
+
*
|
|
2525
|
+
* Delete one active memory by key and scope. Deletes are idempotent when
|
|
2526
|
+
* `if_version` is omitted: deleting a missing key returns `deleted:
|
|
2527
|
+
* false`. With `if_version`, a missing key still returns `deleted: false`,
|
|
2528
|
+
* but a stale version returns `memory_conflict`.
|
|
2529
|
+
*
|
|
2530
|
+
* A successful delete records memory write usage.
|
|
2531
|
+
*
|
|
2532
|
+
*/
|
|
2533
|
+
const deleteMemory = (options) => (options.client ?? client$1).delete({
|
|
2534
|
+
security: [{
|
|
2535
|
+
scheme: "bearer",
|
|
2536
|
+
type: "http"
|
|
2537
|
+
}],
|
|
2538
|
+
url: "/memories",
|
|
2539
|
+
...options
|
|
2540
|
+
});
|
|
2541
|
+
/**
|
|
2542
|
+
* Get a memory
|
|
2543
|
+
*
|
|
2544
|
+
* Fetch one active memory by key and scope. Omit scope parameters to use
|
|
2545
|
+
* the automatic default: function-authenticated context, then the
|
|
2546
|
+
* `x-primitive-function-id` header, then org scope. Function scope uses a
|
|
2547
|
+
* function id UUID in `scope_id`.
|
|
2548
|
+
*
|
|
2549
|
+
* A successful read records memory read usage and updates the memory's
|
|
2550
|
+
* read stats asynchronously.
|
|
2551
|
+
*
|
|
2552
|
+
*/
|
|
2553
|
+
const getMemory = (options) => (options.client ?? client$1).get({
|
|
2554
|
+
security: [{
|
|
2555
|
+
scheme: "bearer",
|
|
2556
|
+
type: "http"
|
|
2557
|
+
}],
|
|
2558
|
+
url: "/memories",
|
|
2559
|
+
...options
|
|
2560
|
+
});
|
|
2561
|
+
/**
|
|
2562
|
+
* Set a memory
|
|
2563
|
+
*
|
|
2564
|
+
* Create or update a durable JSON memory under an org or function scope.
|
|
2565
|
+
* When no explicit scope is provided, function-authenticated requests
|
|
2566
|
+
* use that function's id automatically; requests with
|
|
2567
|
+
* `x-primitive-function-id` use that function id; all other requests
|
|
2568
|
+
* default to org scope.
|
|
2569
|
+
*
|
|
2570
|
+
* `scope.type = function` requires the function id UUID in `scope.id`.
|
|
2571
|
+
* Function names are not accepted as scope identifiers. Values must be
|
|
2572
|
+
* valid JSON and serialize to at most 65536 UTF-8 bytes. Keys must be at
|
|
2573
|
+
* most 512 UTF-8 bytes. `version`, `read_count`, and `write_count` are
|
|
2574
|
+
* bigint counters serialized as strings.
|
|
2575
|
+
*
|
|
2576
|
+
* Passing `if_absent` turns the write into create-only. Passing
|
|
2577
|
+
* `if_version` turns the write into compare-and-set. These options are
|
|
2578
|
+
* mutually exclusive and return `memory_conflict` on a stale version or
|
|
2579
|
+
* existing key.
|
|
2580
|
+
*
|
|
2581
|
+
*/
|
|
2582
|
+
const setMemory = (options) => (options.client ?? client$1).put({
|
|
2583
|
+
security: [{
|
|
2584
|
+
scheme: "bearer",
|
|
2585
|
+
type: "http"
|
|
2586
|
+
}],
|
|
2587
|
+
url: "/memories",
|
|
2588
|
+
...options,
|
|
2589
|
+
headers: {
|
|
2590
|
+
...options.body !== void 0 && { "Content-Type": "application/json" },
|
|
2591
|
+
...options.headers
|
|
2592
|
+
}
|
|
2593
|
+
});
|
|
2594
|
+
/**
|
|
2595
|
+
* Search memories
|
|
2596
|
+
*
|
|
2597
|
+
* List active memories in a scope by lexicographic key prefix. Results
|
|
2598
|
+
* are ordered by key ascending. The `meta.cursor` value is the next key
|
|
2599
|
+
* cursor; pass it back as `cursor` to continue after that key.
|
|
2600
|
+
*
|
|
2601
|
+
* Search records one memory read usage event for the operation. Pass
|
|
2602
|
+
* `include_value=false` to return metadata only.
|
|
2603
|
+
*
|
|
2604
|
+
*/
|
|
2605
|
+
const searchMemories = (options) => (options?.client ?? client$1).get({
|
|
2606
|
+
security: [{
|
|
2607
|
+
scheme: "bearer",
|
|
2608
|
+
type: "http"
|
|
2609
|
+
}],
|
|
2610
|
+
url: "/memories/search",
|
|
2611
|
+
...options
|
|
2612
|
+
});
|
|
2613
|
+
/**
|
|
2341
2614
|
* List payout addresses
|
|
2342
2615
|
*
|
|
2343
2616
|
* List your org's registered payout addresses, newest first.
|
|
@@ -2551,6 +2824,19 @@ const createRegistry = (options) => (options.client ?? client$1).post({
|
|
|
2551
2824
|
}
|
|
2552
2825
|
});
|
|
2553
2826
|
/**
|
|
2827
|
+
* Delete a registry you own
|
|
2828
|
+
*
|
|
2829
|
+
* Removes the registry from discovery and frees its slug for re-creation.
|
|
2830
|
+
*/
|
|
2831
|
+
const deleteRegistry = (options) => (options.client ?? client$1).delete({
|
|
2832
|
+
security: [{
|
|
2833
|
+
scheme: "bearer",
|
|
2834
|
+
type: "http"
|
|
2835
|
+
}],
|
|
2836
|
+
url: "/registries/{slug}",
|
|
2837
|
+
...options
|
|
2838
|
+
});
|
|
2839
|
+
/**
|
|
2554
2840
|
* Get a public registry's metadata
|
|
2555
2841
|
*/
|
|
2556
2842
|
const getRegistry = (options) => (options.client ?? client$1).get({
|
|
@@ -3388,4 +3674,4 @@ async function createAgent(options) {
|
|
|
3388
3674
|
};
|
|
3389
3675
|
}
|
|
3390
3676
|
//#endregion
|
|
3391
|
-
export {
|
|
3677
|
+
export { getFunctionRouting as $, simulateRoute as $t, defineAgent as A, listWakeSchedules as At, deleteRoute as B, resendCliSignupVerification as Bt, createFunctionSecret as C, createConfig as Cn, listRegistries as Ct, createWakeAuthorization as D, listSentEmails as Dt, createRoute as E, listRoutes as Et, deleteFunction as F, reorderRoutes as Ft, downloadDomainZoneFile as G, searchEmails as Gt, deleteWakeSchedule as H, rotateWebhookSecret as Ht, deleteFunctionSecret as I, replayDelivery as It, getAgent as J, sendEmail as Jt, downloadRawEmail as K, searchMemories as Kt, deleteMemory as L, replayEmailWebhooks as Lt, deleteEmail as M, pollCliLogin as Mt, deleteEndpoint as N, publishAgent as Nt, createWakeSchedule as O, listWakeAuthorizations as Ot, deleteFilter as P, registerPayoutAddress as Pt, getFunction as Q, setOrgSecret as Qt, deleteOrgSecret as R, replyToEmail as Rt, createFunction as S, createClient as Sn, listPayoutAddresses as St, createRegistry as T, listRegistryRequests as Tt, discardEmailContent as U, runWakeSchedule as Ut, deleteWakeAuthorization as V, resolveRegistryHandle as Vt, downloadAttachments as W, sdk_gen_exports as Wt, getConversation as X, setFunctionSecret as Xt, getChallenge as Y, setFunctionRoute as Yt, getEmail as Z, setMemory as Zt, createAgentClaimLink as _, updateWakeSchedule as _n, listFilters as _t, client as a, testFunction as an, getSendPermissions as at, createEndpoint as b, verifyCliSignup as bn, listFunctions as bt, PRIMITIVE_SIGNATURE_HEADER as c, updateAccount as cn, getStorageStats as ct, PrimitiveApiClient as d, updateFilter as dn, getWebhookSecret as dt, startAgentClaim as en, getFunctionTestRunTrace as et, PrimitiveApiError as f, updateFunction as fn, listDeclinedPayments as ft, createAgentAccount as g, updateWakeAuthorization as gn, listEndpoints as gt, cliLogout as h, updateSpendPolicy as hn, listEmails as ht, PrimitiveClient as i, testEndpoint as in, getRegistry as it, deleteDomain as j, payChallenge as jt, decideRegistryRequest as k, listWakeDispatches as kt, verifyWebhookSignature as l, updateDomain as ln, getThread as lt, addDomain as m, updateRoute as mn, listDomains as mt, AgentResource as n, startCliLogin as nn, getMemory as nt, createAgent as o, unpublishAgent as on, getSentEmail as ot, createPrimitiveApiClient as p, updateRegistry as pn, listDeliveries as pt, getAccount as q, semanticSearch as qt, InboxResource as r, startCliSignup as rn, getOrgRoutingTopology as rt, createPrimitiveClient as s, unsetFunctionRoute as sn, getSpendPolicy as st, AccountResource as t, startAgentSignup as tn, getInboxStatus as tt, DEFAULT_API_BASE_URL as u, updateEndpoint as un, getWakeSchedule as ut, createChallenge as v, verifyAgentClaim as vn, listFunctionLogs as vt, createOrgSecret as w, listRegistryAgents as wt, createFilter as x, verifyDomain as xn, listOrgSecrets as xt, createEmailChallenge as y, verifyAgentSignup as yn, listFunctionSecrets as yt, deleteRegistry as z, resendAgentSignupVerification as zt };
|