@primitivedotdev/sdk 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +3 -3
- package/dist/{api-DDx-GpM5.js → api-BkhWsqoq.js} +110 -1
- package/dist/{index-DjHyzIVT.d.ts → index-ClyWLBZf.d.ts} +564 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/openapi/index.js +1 -1
- package/dist/{operations.generated-DnPUVxXy.js → operations.generated-CORS0UoM.js} +1337 -99
- package/package.json +1 -1
|
@@ -93,6 +93,10 @@ const openapiDocument = {
|
|
|
93
93
|
"name": "Functions",
|
|
94
94
|
"description": "Deploy JavaScript handlers that run on inbound mail. Each function\nis a single ESM module whose default export is an object with an\nasync `fetch(request, env)` method, in the shape of a Workers-style\nhandler. Primitive signs each delivery and forwards the\n`Primitive-Signature` header to the handler; verify the raw request\nbody with `PRIMITIVE_WEBHOOK_SECRET` before trusting the parsed event.\nThe `event` field is `email.received` for normal inbound mail, or a\nmachine-mail type (`email.bounced`, `email.tls_report`,\n`email.dmarc_report`, `email.dmarc_failure`) for bounces and reports;\nthe payload shape is otherwise identical. Code runs on\nPrimitive's edge runtime; there is no infrastructure to manage.\nSecrets land in `env` as encrypted bindings and are refreshed on\nevery redeploy.\n"
|
|
95
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"name": "Memories",
|
|
98
|
+
"description": "Durable org-scoped or function-scoped JSON key-value storage for\nagents and functions. Keys are caller-defined. Function scope is\nalways addressed by the function id UUID, not by function name.\n"
|
|
99
|
+
},
|
|
96
100
|
{
|
|
97
101
|
"name": "Registries",
|
|
98
102
|
"description": "The Agent Registry: ownable directories of agents, addressable by a\nregistry-scoped handle. A registry's publish policy (owner_only, request,\nor open) decides whether a publish lists immediately or pends owner\napproval. An agent is defined once with a globally unique,\nreachability-verified address, then published into any registry under a\nhandle. Discovery reads (list, resolve, get) are public for public\nregistries; managing a registry and moderating requests use the owner's\nAPI key.\n"
|
|
@@ -2705,6 +2709,219 @@ const openapiDocument = {
|
|
|
2705
2709
|
}
|
|
2706
2710
|
}
|
|
2707
2711
|
},
|
|
2712
|
+
"/memories": {
|
|
2713
|
+
"put": {
|
|
2714
|
+
"operationId": "setMemory",
|
|
2715
|
+
"summary": "Set a memory",
|
|
2716
|
+
"description": "Create or update a durable JSON memory under an org or function scope.\nWhen no explicit scope is provided, function-authenticated requests\nuse that function's id automatically; requests with\n`x-primitive-function-id` use that function id; all other requests\ndefault to org scope.\n\n`scope.type = function` requires the function id UUID in `scope.id`.\nFunction names are not accepted as scope identifiers. Values must be\nvalid JSON and serialize to at most 65536 UTF-8 bytes. Keys must be at\nmost 512 UTF-8 bytes. `version`, `read_count`, and `write_count` are\nbigint counters serialized as strings.\n\nPassing `if_absent` turns the write into create-only. Passing\n`if_version` turns the write into compare-and-set. These options are\nmutually exclusive and return `memory_conflict` on a stale version or\nexisting key.\n",
|
|
2717
|
+
"tags": ["Memories"],
|
|
2718
|
+
"parameters": [{
|
|
2719
|
+
"name": "x-primitive-function-id",
|
|
2720
|
+
"in": "header",
|
|
2721
|
+
"required": false,
|
|
2722
|
+
"description": "Optional function id UUID used as the default scope when the body\ndoes not include `scope`. Ignored when `scope` is provided.\n",
|
|
2723
|
+
"schema": {
|
|
2724
|
+
"type": "string",
|
|
2725
|
+
"format": "uuid"
|
|
2726
|
+
}
|
|
2727
|
+
}],
|
|
2728
|
+
"requestBody": {
|
|
2729
|
+
"required": true,
|
|
2730
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetMemoryInput" } } }
|
|
2731
|
+
},
|
|
2732
|
+
"responses": {
|
|
2733
|
+
"200": {
|
|
2734
|
+
"description": "Existing memory updated",
|
|
2735
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2736
|
+
"type": "object",
|
|
2737
|
+
"properties": { "data": { "$ref": "#/components/schemas/MemoryRecordWithValue" } }
|
|
2738
|
+
}] } } }
|
|
2739
|
+
},
|
|
2740
|
+
"201": {
|
|
2741
|
+
"description": "Memory created",
|
|
2742
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2743
|
+
"type": "object",
|
|
2744
|
+
"properties": { "data": { "$ref": "#/components/schemas/MemoryRecordWithValue" } }
|
|
2745
|
+
}] } } }
|
|
2746
|
+
},
|
|
2747
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2748
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2749
|
+
"402": { "$ref": "#/components/responses/PaymentRequired" },
|
|
2750
|
+
"404": { "$ref": "#/components/responses/NotFound" },
|
|
2751
|
+
"409": { "$ref": "#/components/responses/Conflict" },
|
|
2752
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
2753
|
+
}
|
|
2754
|
+
},
|
|
2755
|
+
"get": {
|
|
2756
|
+
"operationId": "getMemory",
|
|
2757
|
+
"summary": "Get a memory",
|
|
2758
|
+
"description": "Fetch one active memory by key and scope. Omit scope parameters to use\nthe automatic default: function-authenticated context, then the\n`x-primitive-function-id` header, then org scope. Function scope uses a\nfunction id UUID in `scope_id`.\n\nA successful read records memory read usage and updates the memory's\nread stats asynchronously.\n",
|
|
2759
|
+
"tags": ["Memories"],
|
|
2760
|
+
"parameters": [
|
|
2761
|
+
{ "$ref": "#/components/parameters/MemoryKeyQuery" },
|
|
2762
|
+
{ "$ref": "#/components/parameters/MemoryScopeQueryType" },
|
|
2763
|
+
{ "$ref": "#/components/parameters/MemoryScopeId" },
|
|
2764
|
+
{
|
|
2765
|
+
"name": "x-primitive-function-id",
|
|
2766
|
+
"in": "header",
|
|
2767
|
+
"required": false,
|
|
2768
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
2769
|
+
"schema": {
|
|
2770
|
+
"type": "string",
|
|
2771
|
+
"format": "uuid"
|
|
2772
|
+
}
|
|
2773
|
+
}
|
|
2774
|
+
],
|
|
2775
|
+
"responses": {
|
|
2776
|
+
"200": {
|
|
2777
|
+
"description": "Memory record with value",
|
|
2778
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2779
|
+
"type": "object",
|
|
2780
|
+
"properties": { "data": { "$ref": "#/components/schemas/MemoryRecordWithValue" } }
|
|
2781
|
+
}] } } }
|
|
2782
|
+
},
|
|
2783
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2784
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2785
|
+
"402": { "$ref": "#/components/responses/PaymentRequired" },
|
|
2786
|
+
"404": { "$ref": "#/components/responses/NotFound" },
|
|
2787
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
2788
|
+
}
|
|
2789
|
+
},
|
|
2790
|
+
"delete": {
|
|
2791
|
+
"operationId": "deleteMemory",
|
|
2792
|
+
"summary": "Delete a memory",
|
|
2793
|
+
"description": "Delete one active memory by key and scope. Deletes are idempotent when\n`if_version` is omitted: deleting a missing key returns `deleted:\nfalse`. With `if_version`, a missing key still returns `deleted: false`,\nbut a stale version returns `memory_conflict`.\n\nA successful delete records memory write usage.\n",
|
|
2794
|
+
"tags": ["Memories"],
|
|
2795
|
+
"parameters": [
|
|
2796
|
+
{ "$ref": "#/components/parameters/MemoryKeyQuery" },
|
|
2797
|
+
{ "$ref": "#/components/parameters/MemoryScopeQueryType" },
|
|
2798
|
+
{ "$ref": "#/components/parameters/MemoryScopeId" },
|
|
2799
|
+
{
|
|
2800
|
+
"name": "if_version",
|
|
2801
|
+
"in": "query",
|
|
2802
|
+
"required": false,
|
|
2803
|
+
"description": "Optional compare-and-delete version. If the active memory exists\nat a different version, the API returns `memory_conflict`.\n",
|
|
2804
|
+
"schema": { "$ref": "#/components/schemas/NumericString" }
|
|
2805
|
+
},
|
|
2806
|
+
{
|
|
2807
|
+
"name": "x-primitive-function-id",
|
|
2808
|
+
"in": "header",
|
|
2809
|
+
"required": false,
|
|
2810
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
2811
|
+
"schema": {
|
|
2812
|
+
"type": "string",
|
|
2813
|
+
"format": "uuid"
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
],
|
|
2817
|
+
"responses": {
|
|
2818
|
+
"200": {
|
|
2819
|
+
"description": "Delete result",
|
|
2820
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/SuccessEnvelope" }, {
|
|
2821
|
+
"type": "object",
|
|
2822
|
+
"properties": { "data": { "$ref": "#/components/schemas/DeleteMemoryResult" } }
|
|
2823
|
+
}] } } }
|
|
2824
|
+
},
|
|
2825
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2826
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2827
|
+
"402": { "$ref": "#/components/responses/PaymentRequired" },
|
|
2828
|
+
"404": { "$ref": "#/components/responses/NotFound" },
|
|
2829
|
+
"409": { "$ref": "#/components/responses/Conflict" },
|
|
2830
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
},
|
|
2834
|
+
"/memories/search": { "get": {
|
|
2835
|
+
"operationId": "searchMemories",
|
|
2836
|
+
"summary": "Search memories",
|
|
2837
|
+
"description": "List active memories in a scope by lexicographic key prefix. Results\nare ordered by key ascending. The `meta.cursor` value is the next key\ncursor; pass it back as `cursor` to continue after that key.\n\nSearch records one memory read usage event for the operation. Pass\n`include_value=false` to return metadata only.\n",
|
|
2838
|
+
"tags": ["Memories"],
|
|
2839
|
+
"parameters": [
|
|
2840
|
+
{
|
|
2841
|
+
"name": "prefix",
|
|
2842
|
+
"in": "query",
|
|
2843
|
+
"required": false,
|
|
2844
|
+
"description": "Key prefix to match. Empty string lists all active memories in the\nselected scope. Must be at most 512 UTF-8 bytes.\n",
|
|
2845
|
+
"schema": {
|
|
2846
|
+
"type": "string",
|
|
2847
|
+
"maxLength": 512,
|
|
2848
|
+
"default": ""
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
"name": "cursor",
|
|
2853
|
+
"in": "query",
|
|
2854
|
+
"required": false,
|
|
2855
|
+
"description": "Key cursor from a previous response's `meta.cursor`. The next page\nstarts after this key.\n",
|
|
2856
|
+
"schema": {
|
|
2857
|
+
"type": "string",
|
|
2858
|
+
"minLength": 1,
|
|
2859
|
+
"maxLength": 512
|
|
2860
|
+
}
|
|
2861
|
+
},
|
|
2862
|
+
{ "$ref": "#/components/parameters/Limit" },
|
|
2863
|
+
{
|
|
2864
|
+
"name": "include_value",
|
|
2865
|
+
"in": "query",
|
|
2866
|
+
"required": false,
|
|
2867
|
+
"description": "Pass `false` to omit the `value` field and return metadata only.\n",
|
|
2868
|
+
"schema": {
|
|
2869
|
+
"type": "string",
|
|
2870
|
+
"enum": ["true", "false"],
|
|
2871
|
+
"default": "true"
|
|
2872
|
+
}
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
"name": "updated_after",
|
|
2876
|
+
"in": "query",
|
|
2877
|
+
"required": false,
|
|
2878
|
+
"description": "Only include memories updated at or after this timestamp.",
|
|
2879
|
+
"schema": {
|
|
2880
|
+
"type": "string",
|
|
2881
|
+
"format": "date-time"
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
"name": "updated_before",
|
|
2886
|
+
"in": "query",
|
|
2887
|
+
"required": false,
|
|
2888
|
+
"description": "Only include memories updated at or before this timestamp.",
|
|
2889
|
+
"schema": {
|
|
2890
|
+
"type": "string",
|
|
2891
|
+
"format": "date-time"
|
|
2892
|
+
}
|
|
2893
|
+
},
|
|
2894
|
+
{ "$ref": "#/components/parameters/MemoryScopeQueryType" },
|
|
2895
|
+
{ "$ref": "#/components/parameters/MemoryScopeId" },
|
|
2896
|
+
{
|
|
2897
|
+
"name": "x-primitive-function-id",
|
|
2898
|
+
"in": "header",
|
|
2899
|
+
"required": false,
|
|
2900
|
+
"description": "Optional function id UUID used as the default scope when query\nscope parameters are omitted.\n",
|
|
2901
|
+
"schema": {
|
|
2902
|
+
"type": "string",
|
|
2903
|
+
"format": "uuid"
|
|
2904
|
+
}
|
|
2905
|
+
}
|
|
2906
|
+
],
|
|
2907
|
+
"responses": {
|
|
2908
|
+
"200": {
|
|
2909
|
+
"description": "Paginated memory records",
|
|
2910
|
+
"content": { "application/json": { "schema": { "allOf": [{ "$ref": "#/components/schemas/ListEnvelope" }, {
|
|
2911
|
+
"type": "object",
|
|
2912
|
+
"properties": { "data": {
|
|
2913
|
+
"type": "array",
|
|
2914
|
+
"items": { "$ref": "#/components/schemas/MemoryRecord" }
|
|
2915
|
+
} }
|
|
2916
|
+
}] } } }
|
|
2917
|
+
},
|
|
2918
|
+
"400": { "$ref": "#/components/responses/ValidationError" },
|
|
2919
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
2920
|
+
"402": { "$ref": "#/components/responses/PaymentRequired" },
|
|
2921
|
+
"404": { "$ref": "#/components/responses/NotFound" },
|
|
2922
|
+
"429": { "$ref": "#/components/responses/RateLimited" }
|
|
2923
|
+
}
|
|
2924
|
+
} },
|
|
2708
2925
|
"/x402/payout-addresses": {
|
|
2709
2926
|
"post": {
|
|
2710
2927
|
"operationId": "registerPayoutAddress",
|
|
@@ -3023,6 +3240,17 @@ const openapiDocument = {
|
|
|
3023
3240
|
"404": { "$ref": "#/components/responses/NotFound" },
|
|
3024
3241
|
"422": { "$ref": "#/components/responses/ValidationError" }
|
|
3025
3242
|
}
|
|
3243
|
+
},
|
|
3244
|
+
"delete": {
|
|
3245
|
+
"operationId": "deleteRegistry",
|
|
3246
|
+
"summary": "Delete a registry you own",
|
|
3247
|
+
"description": "Removes the registry from discovery and frees its slug for re-creation.",
|
|
3248
|
+
"tags": ["Registries"],
|
|
3249
|
+
"responses": {
|
|
3250
|
+
"200": { "$ref": "#/components/responses/Deleted" },
|
|
3251
|
+
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
3252
|
+
"404": { "$ref": "#/components/responses/NotFound" }
|
|
3253
|
+
}
|
|
3026
3254
|
}
|
|
3027
3255
|
},
|
|
3028
3256
|
"/registries/{slug}/agents": {
|
|
@@ -3299,6 +3527,37 @@ const openapiDocument = {
|
|
|
3299
3527
|
"default": 50
|
|
3300
3528
|
},
|
|
3301
3529
|
"description": "Number of results per page"
|
|
3530
|
+
},
|
|
3531
|
+
"MemoryKeyQuery": {
|
|
3532
|
+
"name": "key",
|
|
3533
|
+
"in": "query",
|
|
3534
|
+
"required": true,
|
|
3535
|
+
"description": "Memory key. Must be at most 512 UTF-8 bytes.",
|
|
3536
|
+
"schema": {
|
|
3537
|
+
"type": "string",
|
|
3538
|
+
"minLength": 1,
|
|
3539
|
+
"maxLength": 512
|
|
3540
|
+
}
|
|
3541
|
+
},
|
|
3542
|
+
"MemoryScopeQueryType": {
|
|
3543
|
+
"name": "scope_type",
|
|
3544
|
+
"in": "query",
|
|
3545
|
+
"required": false,
|
|
3546
|
+
"description": "Explicit scope type. Omit to use automatic scope resolution. Pass\n`function` with `scope_id=<function-id>`, or `org` with no `scope_id`.\n",
|
|
3547
|
+
"schema": {
|
|
3548
|
+
"type": "string",
|
|
3549
|
+
"enum": ["org", "function"]
|
|
3550
|
+
}
|
|
3551
|
+
},
|
|
3552
|
+
"MemoryScopeId": {
|
|
3553
|
+
"name": "scope_id",
|
|
3554
|
+
"in": "query",
|
|
3555
|
+
"required": false,
|
|
3556
|
+
"description": "Function id UUID when `scope_type=function`. Not valid with\n`scope_type=org`.\n",
|
|
3557
|
+
"schema": {
|
|
3558
|
+
"type": "string",
|
|
3559
|
+
"format": "uuid"
|
|
3560
|
+
}
|
|
3302
3561
|
}
|
|
3303
3562
|
},
|
|
3304
3563
|
"responses": {
|
|
@@ -3354,6 +3613,19 @@ const openapiDocument = {
|
|
|
3354
3613
|
}
|
|
3355
3614
|
} }
|
|
3356
3615
|
},
|
|
3616
|
+
"PaymentRequired": {
|
|
3617
|
+
"description": "Usage credits are exhausted or payment is required",
|
|
3618
|
+
"content": { "application/json": {
|
|
3619
|
+
"schema": { "$ref": "#/components/schemas/ErrorResponse" },
|
|
3620
|
+
"example": {
|
|
3621
|
+
"success": false,
|
|
3622
|
+
"error": {
|
|
3623
|
+
"code": "developer_usage_credit_exhausted",
|
|
3624
|
+
"message": "Usage credits exhausted for memory.write"
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
} }
|
|
3628
|
+
},
|
|
3357
3629
|
"DeployFailed": {
|
|
3358
3630
|
"description": "Function deploy could not be completed; previously deployed code remains live",
|
|
3359
3631
|
"content": { "application/json": {
|
|
@@ -3511,6 +3783,11 @@ const openapiDocument = {
|
|
|
3511
3783
|
"handle": {
|
|
3512
3784
|
"type": ["string", "null"],
|
|
3513
3785
|
"description": "The registry-scoped name. Null on the global by-address read."
|
|
3786
|
+
},
|
|
3787
|
+
"last_reachable_at": {
|
|
3788
|
+
"type": ["string", "null"],
|
|
3789
|
+
"format": "date-time",
|
|
3790
|
+
"description": "When the agent's address was last confirmed to still route to its endpoint. A freshness signal for ranking listings; null until the first check."
|
|
3514
3791
|
}
|
|
3515
3792
|
},
|
|
3516
3793
|
"required": [
|
|
@@ -3519,7 +3796,8 @@ const openapiDocument = {
|
|
|
3519
3796
|
"title",
|
|
3520
3797
|
"description",
|
|
3521
3798
|
"tags",
|
|
3522
|
-
"handle"
|
|
3799
|
+
"handle",
|
|
3800
|
+
"last_reachable_at"
|
|
3523
3801
|
]
|
|
3524
3802
|
},
|
|
3525
3803
|
"RegistryRequest": {
|
|
@@ -3590,11 +3868,12 @@ const openapiDocument = {
|
|
|
3590
3868
|
"properties": {
|
|
3591
3869
|
"address": {
|
|
3592
3870
|
"type": "string",
|
|
3593
|
-
"description": "The agent's globally unique email address; must route to the
|
|
3871
|
+
"description": "The agent's globally unique email address; mail to it must route to an endpoint the account controls."
|
|
3594
3872
|
},
|
|
3595
3873
|
"endpoint_id": {
|
|
3596
3874
|
"type": "string",
|
|
3597
|
-
"format": "uuid"
|
|
3875
|
+
"format": "uuid",
|
|
3876
|
+
"description": "Optional. The endpoint the agent runs on. Omit it to resolve the endpoint from the address's routing automatically; supply it to pin a specific endpoint, which is then validated against the address's route."
|
|
3598
3877
|
},
|
|
3599
3878
|
"display_name": {
|
|
3600
3879
|
"type": "string",
|
|
@@ -3618,22 +3897,52 @@ const openapiDocument = {
|
|
|
3618
3897
|
"maxItems": 20
|
|
3619
3898
|
}
|
|
3620
3899
|
},
|
|
3621
|
-
"required": [
|
|
3622
|
-
"address",
|
|
3623
|
-
"endpoint_id",
|
|
3624
|
-
"display_name"
|
|
3625
|
-
]
|
|
3900
|
+
"required": ["address", "display_name"]
|
|
3626
3901
|
},
|
|
3627
3902
|
"PublishAgentInput": {
|
|
3628
3903
|
"type": "object",
|
|
3904
|
+
"description": "Publish an agent into a registry. When display_name is present the agent identity is defined (create-or-get by address) in the same call before publishing; omit the define fields to publish an already-defined agent.",
|
|
3629
3905
|
"properties": {
|
|
3630
3906
|
"address": { "type": "string" },
|
|
3631
3907
|
"handle": {
|
|
3632
3908
|
"type": "string",
|
|
3633
3909
|
"description": "The registry-scoped name to list the agent under."
|
|
3910
|
+
},
|
|
3911
|
+
"display_name": {
|
|
3912
|
+
"type": "string",
|
|
3913
|
+
"minLength": 1,
|
|
3914
|
+
"maxLength": 120,
|
|
3915
|
+
"description": "Present to define the agent identity before publishing (define + publish in one call)."
|
|
3916
|
+
},
|
|
3917
|
+
"endpoint_id": {
|
|
3918
|
+
"type": "string",
|
|
3919
|
+
"format": "uuid",
|
|
3920
|
+
"description": "Optional, only used when defining. Omit to resolve the endpoint from the address's routing."
|
|
3921
|
+
},
|
|
3922
|
+
"title": {
|
|
3923
|
+
"type": ["string", "null"],
|
|
3924
|
+
"maxLength": 120
|
|
3925
|
+
},
|
|
3926
|
+
"description": {
|
|
3927
|
+
"type": ["string", "null"],
|
|
3928
|
+
"maxLength": 2e3
|
|
3929
|
+
},
|
|
3930
|
+
"tags": {
|
|
3931
|
+
"type": "array",
|
|
3932
|
+
"items": {
|
|
3933
|
+
"type": "string",
|
|
3934
|
+
"maxLength": 40
|
|
3935
|
+
},
|
|
3936
|
+
"maxItems": 20
|
|
3634
3937
|
}
|
|
3635
3938
|
},
|
|
3636
|
-
"required": ["address", "handle"]
|
|
3939
|
+
"required": ["address", "handle"],
|
|
3940
|
+
"dependentRequired": {
|
|
3941
|
+
"endpoint_id": ["display_name"],
|
|
3942
|
+
"title": ["display_name"],
|
|
3943
|
+
"description": ["display_name"],
|
|
3944
|
+
"tags": ["display_name"]
|
|
3945
|
+
}
|
|
3637
3946
|
},
|
|
3638
3947
|
"PublishAgentResult": {
|
|
3639
3948
|
"type": "object",
|
|
@@ -4282,6 +4591,8 @@ const openapiDocument = {
|
|
|
4282
4591
|
"no_orgs_for_user",
|
|
4283
4592
|
"org_not_accessible",
|
|
4284
4593
|
"feature_disabled",
|
|
4594
|
+
"memory_conflict",
|
|
4595
|
+
"developer_usage_credit_exhausted",
|
|
4285
4596
|
"no_payout_address",
|
|
4286
4597
|
"ownership_proof_failed",
|
|
4287
4598
|
"payment_verification_failed",
|
|
@@ -8783,47 +9094,287 @@ const openapiDocument = {
|
|
|
8783
9094
|
"updated_at",
|
|
8784
9095
|
"created"
|
|
8785
9096
|
]
|
|
8786
|
-
}
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
"
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
9097
|
+
},
|
|
9098
|
+
"NumericString": {
|
|
9099
|
+
"type": "string",
|
|
9100
|
+
"pattern": "^[0-9]+$",
|
|
9101
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
9102
|
+
},
|
|
9103
|
+
"MemoryJsonValue": {
|
|
9104
|
+
"description": "JSON value accepted by Primitive Memories. The server accepts strings,\nnumbers, booleans, null, arrays, and objects, validates nested values,\nand rejects values that do not serialize as JSON.\n",
|
|
9105
|
+
"oneOf": [
|
|
9106
|
+
{ "type": "null" },
|
|
9107
|
+
{ "type": "string" },
|
|
9108
|
+
{ "type": "number" },
|
|
9109
|
+
{ "type": "boolean" },
|
|
9110
|
+
{
|
|
9111
|
+
"type": "array",
|
|
9112
|
+
"items": { "description": "Any nested JSON value." }
|
|
9113
|
+
},
|
|
9114
|
+
{
|
|
9115
|
+
"type": "object",
|
|
9116
|
+
"additionalProperties": { "description": "Any nested JSON value." }
|
|
9117
|
+
}
|
|
9118
|
+
]
|
|
9119
|
+
},
|
|
9120
|
+
"MemoryScope": {
|
|
9121
|
+
"description": "Memory scope. `org` resolves to the authenticated organization.\n`function` requires the function id UUID in `id`; function names are\nnot valid scope identifiers.\n",
|
|
9122
|
+
"oneOf": [{
|
|
9123
|
+
"type": "object",
|
|
9124
|
+
"additionalProperties": false,
|
|
9125
|
+
"properties": { "type": {
|
|
9126
|
+
"type": "string",
|
|
9127
|
+
"enum": ["org"]
|
|
9128
|
+
} },
|
|
9129
|
+
"required": ["type"]
|
|
9130
|
+
}, {
|
|
9131
|
+
"type": "object",
|
|
9132
|
+
"additionalProperties": false,
|
|
9133
|
+
"properties": {
|
|
9134
|
+
"type": {
|
|
9135
|
+
"type": "string",
|
|
9136
|
+
"enum": ["function"]
|
|
9137
|
+
},
|
|
9138
|
+
"id": {
|
|
9139
|
+
"type": "string",
|
|
9140
|
+
"format": "uuid",
|
|
9141
|
+
"description": "Function id UUID."
|
|
9142
|
+
}
|
|
9143
|
+
},
|
|
9144
|
+
"required": ["type", "id"]
|
|
9145
|
+
}]
|
|
9146
|
+
},
|
|
9147
|
+
"MemoryResolvedScope": {
|
|
9148
|
+
"type": "object",
|
|
9149
|
+
"additionalProperties": false,
|
|
9150
|
+
"description": "Resolved memory scope returned by the API.",
|
|
9151
|
+
"properties": {
|
|
9152
|
+
"type": {
|
|
9153
|
+
"type": "string",
|
|
9154
|
+
"enum": ["org", "function"]
|
|
9155
|
+
},
|
|
9156
|
+
"id": {
|
|
9157
|
+
"type": "string",
|
|
9158
|
+
"format": "uuid",
|
|
9159
|
+
"description": "Org id for org scope, function id for function scope."
|
|
9160
|
+
}
|
|
9161
|
+
},
|
|
9162
|
+
"required": ["type", "id"]
|
|
9163
|
+
},
|
|
9164
|
+
"MemoryRecord": {
|
|
9165
|
+
"type": "object",
|
|
9166
|
+
"additionalProperties": false,
|
|
9167
|
+
"description": "Metadata for a Primitive memory. Search responses omit `value` when\n`include_value=false`.\n",
|
|
9168
|
+
"properties": {
|
|
9169
|
+
"id": {
|
|
9170
|
+
"type": "string",
|
|
9171
|
+
"format": "uuid"
|
|
9172
|
+
},
|
|
9173
|
+
"key": {
|
|
9174
|
+
"type": "string",
|
|
9175
|
+
"minLength": 1,
|
|
9176
|
+
"maxLength": 512,
|
|
9177
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
9178
|
+
},
|
|
9179
|
+
"scope": { "$ref": "#/components/schemas/MemoryResolvedScope" },
|
|
9180
|
+
"value": { "$ref": "#/components/schemas/MemoryJsonValue" },
|
|
9181
|
+
"version": { "$ref": "#/components/schemas/NumericString" },
|
|
9182
|
+
"created_at": {
|
|
9183
|
+
"type": "string",
|
|
9184
|
+
"format": "date-time"
|
|
9185
|
+
},
|
|
9186
|
+
"updated_at": {
|
|
9187
|
+
"type": "string",
|
|
9188
|
+
"format": "date-time"
|
|
9189
|
+
},
|
|
9190
|
+
"last_read_at": {
|
|
9191
|
+
"type": ["string", "null"],
|
|
9192
|
+
"format": "date-time",
|
|
9193
|
+
"description": "Last successful get timestamp, or null before any get."
|
|
9194
|
+
},
|
|
9195
|
+
"read_count": { "$ref": "#/components/schemas/NumericString" },
|
|
9196
|
+
"write_count": { "$ref": "#/components/schemas/NumericString" },
|
|
9197
|
+
"expires_at": {
|
|
9198
|
+
"type": ["string", "null"],
|
|
9199
|
+
"format": "date-time",
|
|
9200
|
+
"description": "Expiration timestamp, or null for no TTL."
|
|
9201
|
+
},
|
|
9202
|
+
"created_by": {
|
|
9203
|
+
"type": ["string", "null"],
|
|
9204
|
+
"description": "Actor that created the memory, when available."
|
|
9205
|
+
},
|
|
9206
|
+
"updated_by": {
|
|
9207
|
+
"type": ["string", "null"],
|
|
9208
|
+
"description": "Actor that last updated the memory, when available."
|
|
9209
|
+
}
|
|
9210
|
+
},
|
|
9211
|
+
"required": [
|
|
9212
|
+
"id",
|
|
9213
|
+
"key",
|
|
9214
|
+
"scope",
|
|
9215
|
+
"version",
|
|
9216
|
+
"created_at",
|
|
9217
|
+
"updated_at",
|
|
9218
|
+
"last_read_at",
|
|
9219
|
+
"read_count",
|
|
9220
|
+
"write_count",
|
|
9221
|
+
"expires_at",
|
|
9222
|
+
"created_by",
|
|
9223
|
+
"updated_by"
|
|
9224
|
+
]
|
|
9225
|
+
},
|
|
9226
|
+
"MemoryRecordWithValue": {
|
|
9227
|
+
"type": "object",
|
|
9228
|
+
"additionalProperties": false,
|
|
9229
|
+
"description": "Memory record returned by get and set operations.",
|
|
9230
|
+
"properties": {
|
|
9231
|
+
"id": {
|
|
9232
|
+
"type": "string",
|
|
9233
|
+
"format": "uuid"
|
|
9234
|
+
},
|
|
9235
|
+
"key": {
|
|
9236
|
+
"type": "string",
|
|
9237
|
+
"minLength": 1,
|
|
9238
|
+
"maxLength": 512,
|
|
9239
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
9240
|
+
},
|
|
9241
|
+
"scope": { "$ref": "#/components/schemas/MemoryResolvedScope" },
|
|
9242
|
+
"value": { "$ref": "#/components/schemas/MemoryJsonValue" },
|
|
9243
|
+
"version": { "$ref": "#/components/schemas/NumericString" },
|
|
9244
|
+
"created_at": {
|
|
9245
|
+
"type": "string",
|
|
9246
|
+
"format": "date-time"
|
|
9247
|
+
},
|
|
9248
|
+
"updated_at": {
|
|
9249
|
+
"type": "string",
|
|
9250
|
+
"format": "date-time"
|
|
9251
|
+
},
|
|
9252
|
+
"last_read_at": {
|
|
9253
|
+
"type": ["string", "null"],
|
|
9254
|
+
"format": "date-time",
|
|
9255
|
+
"description": "Last successful get timestamp, or null before any get."
|
|
9256
|
+
},
|
|
9257
|
+
"read_count": { "$ref": "#/components/schemas/NumericString" },
|
|
9258
|
+
"write_count": { "$ref": "#/components/schemas/NumericString" },
|
|
9259
|
+
"expires_at": {
|
|
9260
|
+
"type": ["string", "null"],
|
|
9261
|
+
"format": "date-time",
|
|
9262
|
+
"description": "Expiration timestamp, or null for no TTL."
|
|
9263
|
+
},
|
|
9264
|
+
"created_by": {
|
|
9265
|
+
"type": ["string", "null"],
|
|
9266
|
+
"description": "Actor that created the memory, when available."
|
|
9267
|
+
},
|
|
9268
|
+
"updated_by": {
|
|
9269
|
+
"type": ["string", "null"],
|
|
9270
|
+
"description": "Actor that last updated the memory, when available."
|
|
9271
|
+
}
|
|
9272
|
+
},
|
|
9273
|
+
"required": [
|
|
9274
|
+
"id",
|
|
9275
|
+
"key",
|
|
9276
|
+
"scope",
|
|
9277
|
+
"value",
|
|
9278
|
+
"version",
|
|
9279
|
+
"created_at",
|
|
9280
|
+
"updated_at",
|
|
9281
|
+
"last_read_at",
|
|
9282
|
+
"read_count",
|
|
9283
|
+
"write_count",
|
|
9284
|
+
"expires_at",
|
|
9285
|
+
"created_by",
|
|
9286
|
+
"updated_by"
|
|
9287
|
+
]
|
|
9288
|
+
},
|
|
9289
|
+
"SetMemoryInput": {
|
|
9290
|
+
"type": "object",
|
|
9291
|
+
"additionalProperties": false,
|
|
9292
|
+
"properties": {
|
|
9293
|
+
"key": {
|
|
9294
|
+
"type": "string",
|
|
9295
|
+
"minLength": 1,
|
|
9296
|
+
"maxLength": 512,
|
|
9297
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
9298
|
+
},
|
|
9299
|
+
"value": { "$ref": "#/components/schemas/MemoryJsonValue" },
|
|
9300
|
+
"scope": { "$ref": "#/components/schemas/MemoryScope" },
|
|
9301
|
+
"ttl_seconds": {
|
|
9302
|
+
"type": "integer",
|
|
9303
|
+
"minimum": 1,
|
|
9304
|
+
"maximum": 31536e3,
|
|
9305
|
+
"description": "Set or replace the TTL in seconds. Mutually exclusive with\n`expires_at` and `clear_ttl`.\n"
|
|
9306
|
+
},
|
|
9307
|
+
"expires_at": {
|
|
9308
|
+
"type": "string",
|
|
9309
|
+
"format": "date-time",
|
|
9310
|
+
"description": "Set or replace the absolute expiration timestamp. Mutually\nexclusive with `ttl_seconds` and `clear_ttl`.\n"
|
|
9311
|
+
},
|
|
9312
|
+
"clear_ttl": {
|
|
9313
|
+
"type": "boolean",
|
|
9314
|
+
"description": "Clear any existing TTL. Mutually exclusive with `ttl_seconds` and\n`expires_at`.\n"
|
|
9315
|
+
},
|
|
9316
|
+
"if_absent": {
|
|
9317
|
+
"type": "boolean",
|
|
9318
|
+
"description": "Create only when the key is absent. Mutually exclusive with\n`if_version`.\n"
|
|
9319
|
+
},
|
|
9320
|
+
"if_version": { "$ref": "#/components/schemas/NumericString" }
|
|
9321
|
+
},
|
|
9322
|
+
"required": ["key", "value"]
|
|
9323
|
+
},
|
|
9324
|
+
"DeleteMemoryResult": {
|
|
9325
|
+
"type": "object",
|
|
9326
|
+
"additionalProperties": false,
|
|
9327
|
+
"properties": {
|
|
9328
|
+
"deleted": { "type": "boolean" },
|
|
9329
|
+
"key": { "type": "string" },
|
|
9330
|
+
"scope": { "$ref": "#/components/schemas/MemoryResolvedScope" }
|
|
9331
|
+
},
|
|
9332
|
+
"required": [
|
|
9333
|
+
"deleted",
|
|
9334
|
+
"key",
|
|
9335
|
+
"scope"
|
|
9336
|
+
]
|
|
9337
|
+
}
|
|
9338
|
+
}
|
|
9339
|
+
}
|
|
9340
|
+
};
|
|
9341
|
+
//#endregion
|
|
9342
|
+
//#region ../packages/api-core/src/openapi/operations.generated.ts
|
|
9343
|
+
const operationManifest = [
|
|
9344
|
+
{
|
|
9345
|
+
"binaryResponse": false,
|
|
9346
|
+
"bodyRequired": false,
|
|
9347
|
+
"command": "get-account",
|
|
9348
|
+
"description": null,
|
|
9349
|
+
"hasJsonBody": false,
|
|
9350
|
+
"method": "GET",
|
|
9351
|
+
"operationId": "getAccount",
|
|
9352
|
+
"path": "/account",
|
|
9353
|
+
"pathParams": [],
|
|
9354
|
+
"queryParams": [],
|
|
9355
|
+
"requestSchema": null,
|
|
9356
|
+
"responseSchema": {
|
|
9357
|
+
"type": "object",
|
|
9358
|
+
"properties": {
|
|
9359
|
+
"id": {
|
|
9360
|
+
"type": "string",
|
|
9361
|
+
"format": "uuid"
|
|
9362
|
+
},
|
|
9363
|
+
"email": { "type": "string" },
|
|
9364
|
+
"plan": { "type": "string" },
|
|
9365
|
+
"limits": {
|
|
9366
|
+
"type": "object",
|
|
9367
|
+
"description": "Plan-derived quota limits for an account.",
|
|
9368
|
+
"properties": {
|
|
9369
|
+
"storage_mb": { "type": "number" },
|
|
9370
|
+
"send_per_hour": { "type": "number" },
|
|
9371
|
+
"send_per_day": { "type": "number" },
|
|
9372
|
+
"api_per_minute": { "type": "number" },
|
|
9373
|
+
"webhooks_max_global": { "type": ["number", "null"] },
|
|
9374
|
+
"webhooks_per_domain": { "type": "boolean" },
|
|
9375
|
+
"filters_per_domain": { "type": "boolean" },
|
|
9376
|
+
"spam_thresholds_per_domain": { "type": "boolean" }
|
|
9377
|
+
},
|
|
8827
9378
|
"required": [
|
|
8828
9379
|
"storage_mb",
|
|
8829
9380
|
"send_per_hour",
|
|
@@ -14254,48 +14805,662 @@ const operationManifest = [
|
|
|
14254
14805
|
},
|
|
14255
14806
|
{
|
|
14256
14807
|
"binaryResponse": false,
|
|
14257
|
-
"bodyRequired":
|
|
14258
|
-
"command": "
|
|
14259
|
-
"description": "
|
|
14260
|
-
"hasJsonBody":
|
|
14261
|
-
"method": "
|
|
14262
|
-
"operationId": "
|
|
14263
|
-
"path": "/
|
|
14808
|
+
"bodyRequired": false,
|
|
14809
|
+
"command": "delete-memory",
|
|
14810
|
+
"description": "Delete one active memory by key and scope. Deletes are idempotent when\n`if_version` is omitted: deleting a missing key returns `deleted:\nfalse`. With `if_version`, a missing key still returns `deleted: false`,\nbut a stale version returns `memory_conflict`.\n\nA successful delete records memory write usage.\n",
|
|
14811
|
+
"hasJsonBody": false,
|
|
14812
|
+
"method": "DELETE",
|
|
14813
|
+
"operationId": "deleteMemory",
|
|
14814
|
+
"path": "/memories",
|
|
14264
14815
|
"pathParams": [],
|
|
14265
|
-
"queryParams": [
|
|
14266
|
-
|
|
14816
|
+
"queryParams": [
|
|
14817
|
+
{
|
|
14818
|
+
"description": "Memory key. Must be at most 512 UTF-8 bytes.",
|
|
14819
|
+
"enum": null,
|
|
14820
|
+
"name": "key",
|
|
14821
|
+
"required": true,
|
|
14822
|
+
"type": "string"
|
|
14823
|
+
},
|
|
14824
|
+
{
|
|
14825
|
+
"description": "Explicit scope type. Omit to use automatic scope resolution. Pass\n`function` with `scope_id=<function-id>`, or `org` with no `scope_id`.\n",
|
|
14826
|
+
"enum": ["org", "function"],
|
|
14827
|
+
"name": "scope_type",
|
|
14828
|
+
"required": false,
|
|
14829
|
+
"type": "string"
|
|
14830
|
+
},
|
|
14831
|
+
{
|
|
14832
|
+
"description": "Function id UUID when `scope_type=function`. Not valid with\n`scope_type=org`.\n",
|
|
14833
|
+
"enum": null,
|
|
14834
|
+
"name": "scope_id",
|
|
14835
|
+
"required": false,
|
|
14836
|
+
"type": "string"
|
|
14837
|
+
},
|
|
14838
|
+
{
|
|
14839
|
+
"description": "Optional compare-and-delete version. If the active memory exists\nat a different version, the API returns `memory_conflict`.\n",
|
|
14840
|
+
"enum": null,
|
|
14841
|
+
"name": "if_version",
|
|
14842
|
+
"required": false,
|
|
14843
|
+
"type": "string"
|
|
14844
|
+
}
|
|
14845
|
+
],
|
|
14846
|
+
"requestSchema": null,
|
|
14847
|
+
"responseSchema": {
|
|
14267
14848
|
"type": "object",
|
|
14268
14849
|
"additionalProperties": false,
|
|
14269
14850
|
"properties": {
|
|
14270
|
-
"
|
|
14271
|
-
|
|
14272
|
-
|
|
14273
|
-
"
|
|
14274
|
-
|
|
14275
|
-
|
|
14276
|
-
"
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
|
|
14280
|
-
|
|
14281
|
-
|
|
14282
|
-
|
|
14283
|
-
|
|
14284
|
-
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
"
|
|
14288
|
-
|
|
14289
|
-
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14851
|
+
"deleted": { "type": "boolean" },
|
|
14852
|
+
"key": { "type": "string" },
|
|
14853
|
+
"scope": {
|
|
14854
|
+
"type": "object",
|
|
14855
|
+
"additionalProperties": false,
|
|
14856
|
+
"description": "Resolved memory scope returned by the API.",
|
|
14857
|
+
"properties": {
|
|
14858
|
+
"type": {
|
|
14859
|
+
"type": "string",
|
|
14860
|
+
"enum": ["org", "function"]
|
|
14861
|
+
},
|
|
14862
|
+
"id": {
|
|
14863
|
+
"type": "string",
|
|
14864
|
+
"format": "uuid",
|
|
14865
|
+
"description": "Org id for org scope, function id for function scope."
|
|
14866
|
+
}
|
|
14867
|
+
},
|
|
14868
|
+
"required": ["type", "id"]
|
|
14869
|
+
}
|
|
14870
|
+
},
|
|
14871
|
+
"required": [
|
|
14872
|
+
"deleted",
|
|
14873
|
+
"key",
|
|
14874
|
+
"scope"
|
|
14875
|
+
]
|
|
14876
|
+
},
|
|
14877
|
+
"sdkName": "deleteMemory",
|
|
14878
|
+
"summary": "Delete a memory",
|
|
14879
|
+
"tag": "Memories",
|
|
14880
|
+
"tagCommand": "memories"
|
|
14881
|
+
},
|
|
14882
|
+
{
|
|
14883
|
+
"binaryResponse": false,
|
|
14884
|
+
"bodyRequired": false,
|
|
14885
|
+
"command": "get-memory",
|
|
14886
|
+
"description": "Fetch one active memory by key and scope. Omit scope parameters to use\nthe automatic default: function-authenticated context, then the\n`x-primitive-function-id` header, then org scope. Function scope uses a\nfunction id UUID in `scope_id`.\n\nA successful read records memory read usage and updates the memory's\nread stats asynchronously.\n",
|
|
14887
|
+
"hasJsonBody": false,
|
|
14888
|
+
"method": "GET",
|
|
14889
|
+
"operationId": "getMemory",
|
|
14890
|
+
"path": "/memories",
|
|
14891
|
+
"pathParams": [],
|
|
14892
|
+
"queryParams": [
|
|
14893
|
+
{
|
|
14894
|
+
"description": "Memory key. Must be at most 512 UTF-8 bytes.",
|
|
14895
|
+
"enum": null,
|
|
14896
|
+
"name": "key",
|
|
14897
|
+
"required": true,
|
|
14898
|
+
"type": "string"
|
|
14899
|
+
},
|
|
14900
|
+
{
|
|
14901
|
+
"description": "Explicit scope type. Omit to use automatic scope resolution. Pass\n`function` with `scope_id=<function-id>`, or `org` with no `scope_id`.\n",
|
|
14902
|
+
"enum": ["org", "function"],
|
|
14903
|
+
"name": "scope_type",
|
|
14904
|
+
"required": false,
|
|
14905
|
+
"type": "string"
|
|
14906
|
+
},
|
|
14907
|
+
{
|
|
14908
|
+
"description": "Function id UUID when `scope_type=function`. Not valid with\n`scope_type=org`.\n",
|
|
14909
|
+
"enum": null,
|
|
14910
|
+
"name": "scope_id",
|
|
14911
|
+
"required": false,
|
|
14912
|
+
"type": "string"
|
|
14913
|
+
}
|
|
14914
|
+
],
|
|
14915
|
+
"requestSchema": null,
|
|
14916
|
+
"responseSchema": {
|
|
14917
|
+
"type": "object",
|
|
14918
|
+
"additionalProperties": false,
|
|
14919
|
+
"description": "Memory record returned by get and set operations.",
|
|
14920
|
+
"properties": {
|
|
14921
|
+
"id": {
|
|
14922
|
+
"type": "string",
|
|
14923
|
+
"format": "uuid"
|
|
14924
|
+
},
|
|
14925
|
+
"key": {
|
|
14926
|
+
"type": "string",
|
|
14927
|
+
"minLength": 1,
|
|
14928
|
+
"maxLength": 512,
|
|
14929
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
14930
|
+
},
|
|
14931
|
+
"scope": {
|
|
14932
|
+
"type": "object",
|
|
14933
|
+
"additionalProperties": false,
|
|
14934
|
+
"description": "Resolved memory scope returned by the API.",
|
|
14935
|
+
"properties": {
|
|
14936
|
+
"type": {
|
|
14937
|
+
"type": "string",
|
|
14938
|
+
"enum": ["org", "function"]
|
|
14939
|
+
},
|
|
14940
|
+
"id": {
|
|
14941
|
+
"type": "string",
|
|
14942
|
+
"format": "uuid",
|
|
14943
|
+
"description": "Org id for org scope, function id for function scope."
|
|
14944
|
+
}
|
|
14945
|
+
},
|
|
14946
|
+
"required": ["type", "id"]
|
|
14947
|
+
},
|
|
14948
|
+
"value": {
|
|
14949
|
+
"description": "JSON value accepted by Primitive Memories. The server accepts strings,\nnumbers, booleans, null, arrays, and objects, validates nested values,\nand rejects values that do not serialize as JSON.\n",
|
|
14950
|
+
"oneOf": [
|
|
14951
|
+
{ "type": "null" },
|
|
14952
|
+
{ "type": "string" },
|
|
14953
|
+
{ "type": "number" },
|
|
14954
|
+
{ "type": "boolean" },
|
|
14955
|
+
{
|
|
14956
|
+
"type": "array",
|
|
14957
|
+
"items": { "description": "Any nested JSON value." }
|
|
14958
|
+
},
|
|
14959
|
+
{
|
|
14960
|
+
"type": "object",
|
|
14961
|
+
"additionalProperties": { "description": "Any nested JSON value." }
|
|
14962
|
+
}
|
|
14963
|
+
]
|
|
14964
|
+
},
|
|
14965
|
+
"version": {
|
|
14966
|
+
"type": "string",
|
|
14967
|
+
"pattern": "^[0-9]+$",
|
|
14968
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
14969
|
+
},
|
|
14970
|
+
"created_at": {
|
|
14971
|
+
"type": "string",
|
|
14972
|
+
"format": "date-time"
|
|
14973
|
+
},
|
|
14974
|
+
"updated_at": {
|
|
14975
|
+
"type": "string",
|
|
14976
|
+
"format": "date-time"
|
|
14977
|
+
},
|
|
14978
|
+
"last_read_at": {
|
|
14979
|
+
"type": ["string", "null"],
|
|
14980
|
+
"format": "date-time",
|
|
14981
|
+
"description": "Last successful get timestamp, or null before any get."
|
|
14982
|
+
},
|
|
14983
|
+
"read_count": {
|
|
14984
|
+
"type": "string",
|
|
14985
|
+
"pattern": "^[0-9]+$",
|
|
14986
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
14987
|
+
},
|
|
14988
|
+
"write_count": {
|
|
14989
|
+
"type": "string",
|
|
14990
|
+
"pattern": "^[0-9]+$",
|
|
14991
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
14992
|
+
},
|
|
14993
|
+
"expires_at": {
|
|
14994
|
+
"type": ["string", "null"],
|
|
14995
|
+
"format": "date-time",
|
|
14996
|
+
"description": "Expiration timestamp, or null for no TTL."
|
|
14997
|
+
},
|
|
14998
|
+
"created_by": {
|
|
14999
|
+
"type": ["string", "null"],
|
|
15000
|
+
"description": "Actor that created the memory, when available."
|
|
15001
|
+
},
|
|
15002
|
+
"updated_by": {
|
|
15003
|
+
"type": ["string", "null"],
|
|
15004
|
+
"description": "Actor that last updated the memory, when available."
|
|
15005
|
+
}
|
|
15006
|
+
},
|
|
15007
|
+
"required": [
|
|
15008
|
+
"id",
|
|
15009
|
+
"key",
|
|
15010
|
+
"scope",
|
|
15011
|
+
"value",
|
|
15012
|
+
"version",
|
|
15013
|
+
"created_at",
|
|
15014
|
+
"updated_at",
|
|
15015
|
+
"last_read_at",
|
|
15016
|
+
"read_count",
|
|
15017
|
+
"write_count",
|
|
15018
|
+
"expires_at",
|
|
15019
|
+
"created_by",
|
|
15020
|
+
"updated_by"
|
|
15021
|
+
]
|
|
15022
|
+
},
|
|
15023
|
+
"sdkName": "getMemory",
|
|
15024
|
+
"summary": "Get a memory",
|
|
15025
|
+
"tag": "Memories",
|
|
15026
|
+
"tagCommand": "memories"
|
|
15027
|
+
},
|
|
15028
|
+
{
|
|
15029
|
+
"binaryResponse": false,
|
|
15030
|
+
"bodyRequired": false,
|
|
15031
|
+
"command": "search-memories",
|
|
15032
|
+
"description": "List active memories in a scope by lexicographic key prefix. Results\nare ordered by key ascending. The `meta.cursor` value is the next key\ncursor; pass it back as `cursor` to continue after that key.\n\nSearch records one memory read usage event for the operation. Pass\n`include_value=false` to return metadata only.\n",
|
|
15033
|
+
"hasJsonBody": false,
|
|
15034
|
+
"method": "GET",
|
|
15035
|
+
"operationId": "searchMemories",
|
|
15036
|
+
"path": "/memories/search",
|
|
15037
|
+
"pathParams": [],
|
|
15038
|
+
"queryParams": [
|
|
15039
|
+
{
|
|
15040
|
+
"default": "",
|
|
15041
|
+
"description": "Key prefix to match. Empty string lists all active memories in the\nselected scope. Must be at most 512 UTF-8 bytes.\n",
|
|
15042
|
+
"enum": null,
|
|
15043
|
+
"name": "prefix",
|
|
15044
|
+
"required": false,
|
|
15045
|
+
"type": "string"
|
|
15046
|
+
},
|
|
15047
|
+
{
|
|
15048
|
+
"description": "Key cursor from a previous response's `meta.cursor`. The next page\nstarts after this key.\n",
|
|
15049
|
+
"enum": null,
|
|
15050
|
+
"name": "cursor",
|
|
15051
|
+
"required": false,
|
|
15052
|
+
"type": "string"
|
|
15053
|
+
},
|
|
15054
|
+
{
|
|
15055
|
+
"default": 50,
|
|
15056
|
+
"description": "Number of results per page",
|
|
15057
|
+
"enum": null,
|
|
15058
|
+
"maximum": 100,
|
|
15059
|
+
"minimum": 1,
|
|
15060
|
+
"name": "limit",
|
|
15061
|
+
"required": false,
|
|
15062
|
+
"type": "integer"
|
|
15063
|
+
},
|
|
15064
|
+
{
|
|
15065
|
+
"default": "true",
|
|
15066
|
+
"description": "Pass `false` to omit the `value` field and return metadata only.\n",
|
|
15067
|
+
"enum": ["true", "false"],
|
|
15068
|
+
"name": "include_value",
|
|
15069
|
+
"required": false,
|
|
15070
|
+
"type": "string"
|
|
15071
|
+
},
|
|
15072
|
+
{
|
|
15073
|
+
"description": "Only include memories updated at or after this timestamp.",
|
|
15074
|
+
"enum": null,
|
|
15075
|
+
"name": "updated_after",
|
|
15076
|
+
"required": false,
|
|
15077
|
+
"type": "string"
|
|
15078
|
+
},
|
|
15079
|
+
{
|
|
15080
|
+
"description": "Only include memories updated at or before this timestamp.",
|
|
15081
|
+
"enum": null,
|
|
15082
|
+
"name": "updated_before",
|
|
15083
|
+
"required": false,
|
|
15084
|
+
"type": "string"
|
|
15085
|
+
},
|
|
15086
|
+
{
|
|
15087
|
+
"description": "Explicit scope type. Omit to use automatic scope resolution. Pass\n`function` with `scope_id=<function-id>`, or `org` with no `scope_id`.\n",
|
|
15088
|
+
"enum": ["org", "function"],
|
|
15089
|
+
"name": "scope_type",
|
|
15090
|
+
"required": false,
|
|
15091
|
+
"type": "string"
|
|
15092
|
+
},
|
|
15093
|
+
{
|
|
15094
|
+
"description": "Function id UUID when `scope_type=function`. Not valid with\n`scope_type=org`.\n",
|
|
15095
|
+
"enum": null,
|
|
15096
|
+
"name": "scope_id",
|
|
15097
|
+
"required": false,
|
|
15098
|
+
"type": "string"
|
|
15099
|
+
}
|
|
15100
|
+
],
|
|
15101
|
+
"requestSchema": null,
|
|
15102
|
+
"responseSchema": {
|
|
15103
|
+
"type": "array",
|
|
15104
|
+
"items": {
|
|
15105
|
+
"type": "object",
|
|
15106
|
+
"additionalProperties": false,
|
|
15107
|
+
"description": "Metadata for a Primitive memory. Search responses omit `value` when\n`include_value=false`.\n",
|
|
15108
|
+
"properties": {
|
|
15109
|
+
"id": {
|
|
15110
|
+
"type": "string",
|
|
15111
|
+
"format": "uuid"
|
|
15112
|
+
},
|
|
15113
|
+
"key": {
|
|
15114
|
+
"type": "string",
|
|
15115
|
+
"minLength": 1,
|
|
15116
|
+
"maxLength": 512,
|
|
15117
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
15118
|
+
},
|
|
15119
|
+
"scope": {
|
|
15120
|
+
"type": "object",
|
|
15121
|
+
"additionalProperties": false,
|
|
15122
|
+
"description": "Resolved memory scope returned by the API.",
|
|
15123
|
+
"properties": {
|
|
15124
|
+
"type": {
|
|
15125
|
+
"type": "string",
|
|
15126
|
+
"enum": ["org", "function"]
|
|
15127
|
+
},
|
|
15128
|
+
"id": {
|
|
15129
|
+
"type": "string",
|
|
15130
|
+
"format": "uuid",
|
|
15131
|
+
"description": "Org id for org scope, function id for function scope."
|
|
15132
|
+
}
|
|
15133
|
+
},
|
|
15134
|
+
"required": ["type", "id"]
|
|
15135
|
+
},
|
|
15136
|
+
"value": {
|
|
15137
|
+
"description": "JSON value accepted by Primitive Memories. The server accepts strings,\nnumbers, booleans, null, arrays, and objects, validates nested values,\nand rejects values that do not serialize as JSON.\n",
|
|
15138
|
+
"oneOf": [
|
|
15139
|
+
{ "type": "null" },
|
|
15140
|
+
{ "type": "string" },
|
|
15141
|
+
{ "type": "number" },
|
|
15142
|
+
{ "type": "boolean" },
|
|
15143
|
+
{
|
|
15144
|
+
"type": "array",
|
|
15145
|
+
"items": { "description": "Any nested JSON value." }
|
|
15146
|
+
},
|
|
15147
|
+
{
|
|
15148
|
+
"type": "object",
|
|
15149
|
+
"additionalProperties": { "description": "Any nested JSON value." }
|
|
15150
|
+
}
|
|
15151
|
+
]
|
|
15152
|
+
},
|
|
15153
|
+
"version": {
|
|
15154
|
+
"type": "string",
|
|
15155
|
+
"pattern": "^[0-9]+$",
|
|
15156
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15157
|
+
},
|
|
15158
|
+
"created_at": {
|
|
15159
|
+
"type": "string",
|
|
15160
|
+
"format": "date-time"
|
|
15161
|
+
},
|
|
15162
|
+
"updated_at": {
|
|
15163
|
+
"type": "string",
|
|
15164
|
+
"format": "date-time"
|
|
15165
|
+
},
|
|
15166
|
+
"last_read_at": {
|
|
15167
|
+
"type": ["string", "null"],
|
|
15168
|
+
"format": "date-time",
|
|
15169
|
+
"description": "Last successful get timestamp, or null before any get."
|
|
15170
|
+
},
|
|
15171
|
+
"read_count": {
|
|
15172
|
+
"type": "string",
|
|
15173
|
+
"pattern": "^[0-9]+$",
|
|
15174
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15175
|
+
},
|
|
15176
|
+
"write_count": {
|
|
15177
|
+
"type": "string",
|
|
15178
|
+
"pattern": "^[0-9]+$",
|
|
15179
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15180
|
+
},
|
|
15181
|
+
"expires_at": {
|
|
15182
|
+
"type": ["string", "null"],
|
|
15183
|
+
"format": "date-time",
|
|
15184
|
+
"description": "Expiration timestamp, or null for no TTL."
|
|
15185
|
+
},
|
|
15186
|
+
"created_by": {
|
|
15187
|
+
"type": ["string", "null"],
|
|
15188
|
+
"description": "Actor that created the memory, when available."
|
|
15189
|
+
},
|
|
15190
|
+
"updated_by": {
|
|
15191
|
+
"type": ["string", "null"],
|
|
15192
|
+
"description": "Actor that last updated the memory, when available."
|
|
15193
|
+
}
|
|
15194
|
+
},
|
|
15195
|
+
"required": [
|
|
15196
|
+
"id",
|
|
15197
|
+
"key",
|
|
15198
|
+
"scope",
|
|
15199
|
+
"version",
|
|
15200
|
+
"created_at",
|
|
15201
|
+
"updated_at",
|
|
15202
|
+
"last_read_at",
|
|
15203
|
+
"read_count",
|
|
15204
|
+
"write_count",
|
|
15205
|
+
"expires_at",
|
|
15206
|
+
"created_by",
|
|
15207
|
+
"updated_by"
|
|
15208
|
+
]
|
|
15209
|
+
}
|
|
15210
|
+
},
|
|
15211
|
+
"sdkName": "searchMemories",
|
|
15212
|
+
"summary": "Search memories",
|
|
15213
|
+
"tag": "Memories",
|
|
15214
|
+
"tagCommand": "memories"
|
|
15215
|
+
},
|
|
15216
|
+
{
|
|
15217
|
+
"binaryResponse": false,
|
|
15218
|
+
"bodyRequired": true,
|
|
15219
|
+
"command": "set-memory",
|
|
15220
|
+
"description": "Create or update a durable JSON memory under an org or function scope.\nWhen no explicit scope is provided, function-authenticated requests\nuse that function's id automatically; requests with\n`x-primitive-function-id` use that function id; all other requests\ndefault to org scope.\n\n`scope.type = function` requires the function id UUID in `scope.id`.\nFunction names are not accepted as scope identifiers. Values must be\nvalid JSON and serialize to at most 65536 UTF-8 bytes. Keys must be at\nmost 512 UTF-8 bytes. `version`, `read_count`, and `write_count` are\nbigint counters serialized as strings.\n\nPassing `if_absent` turns the write into create-only. Passing\n`if_version` turns the write into compare-and-set. These options are\nmutually exclusive and return `memory_conflict` on a stale version or\nexisting key.\n",
|
|
15221
|
+
"hasJsonBody": true,
|
|
15222
|
+
"method": "PUT",
|
|
15223
|
+
"operationId": "setMemory",
|
|
15224
|
+
"path": "/memories",
|
|
15225
|
+
"pathParams": [],
|
|
15226
|
+
"queryParams": [],
|
|
15227
|
+
"requestSchema": {
|
|
15228
|
+
"type": "object",
|
|
15229
|
+
"additionalProperties": false,
|
|
15230
|
+
"properties": {
|
|
15231
|
+
"key": {
|
|
15232
|
+
"type": "string",
|
|
15233
|
+
"minLength": 1,
|
|
15234
|
+
"maxLength": 512,
|
|
15235
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
15236
|
+
},
|
|
15237
|
+
"value": {
|
|
15238
|
+
"description": "JSON value accepted by Primitive Memories. The server accepts strings,\nnumbers, booleans, null, arrays, and objects, validates nested values,\nand rejects values that do not serialize as JSON.\n",
|
|
15239
|
+
"oneOf": [
|
|
15240
|
+
{ "type": "null" },
|
|
15241
|
+
{ "type": "string" },
|
|
15242
|
+
{ "type": "number" },
|
|
15243
|
+
{ "type": "boolean" },
|
|
15244
|
+
{
|
|
15245
|
+
"type": "array",
|
|
15246
|
+
"items": { "description": "Any nested JSON value." }
|
|
15247
|
+
},
|
|
15248
|
+
{
|
|
15249
|
+
"type": "object",
|
|
15250
|
+
"additionalProperties": { "description": "Any nested JSON value." }
|
|
15251
|
+
}
|
|
15252
|
+
]
|
|
15253
|
+
},
|
|
15254
|
+
"scope": {
|
|
15255
|
+
"description": "Memory scope. `org` resolves to the authenticated organization.\n`function` requires the function id UUID in `id`; function names are\nnot valid scope identifiers.\n",
|
|
15256
|
+
"oneOf": [{
|
|
15257
|
+
"type": "object",
|
|
15258
|
+
"additionalProperties": false,
|
|
15259
|
+
"properties": { "type": {
|
|
15260
|
+
"type": "string",
|
|
15261
|
+
"enum": ["org"]
|
|
15262
|
+
} },
|
|
15263
|
+
"required": ["type"]
|
|
15264
|
+
}, {
|
|
15265
|
+
"type": "object",
|
|
15266
|
+
"additionalProperties": false,
|
|
15267
|
+
"properties": {
|
|
15268
|
+
"type": {
|
|
15269
|
+
"type": "string",
|
|
15270
|
+
"enum": ["function"]
|
|
15271
|
+
},
|
|
15272
|
+
"id": {
|
|
15273
|
+
"type": "string",
|
|
15274
|
+
"format": "uuid",
|
|
15275
|
+
"description": "Function id UUID."
|
|
15276
|
+
}
|
|
15277
|
+
},
|
|
15278
|
+
"required": ["type", "id"]
|
|
15279
|
+
}]
|
|
15280
|
+
},
|
|
15281
|
+
"ttl_seconds": {
|
|
15282
|
+
"type": "integer",
|
|
15283
|
+
"minimum": 1,
|
|
15284
|
+
"maximum": 31536e3,
|
|
15285
|
+
"description": "Set or replace the TTL in seconds. Mutually exclusive with\n`expires_at` and `clear_ttl`.\n"
|
|
15286
|
+
},
|
|
15287
|
+
"expires_at": {
|
|
15288
|
+
"type": "string",
|
|
15289
|
+
"format": "date-time",
|
|
15290
|
+
"description": "Set or replace the absolute expiration timestamp. Mutually\nexclusive with `ttl_seconds` and `clear_ttl`.\n"
|
|
15291
|
+
},
|
|
15292
|
+
"clear_ttl": {
|
|
15293
|
+
"type": "boolean",
|
|
15294
|
+
"description": "Clear any existing TTL. Mutually exclusive with `ttl_seconds` and\n`expires_at`.\n"
|
|
15295
|
+
},
|
|
15296
|
+
"if_absent": {
|
|
15297
|
+
"type": "boolean",
|
|
15298
|
+
"description": "Create only when the key is absent. Mutually exclusive with\n`if_version`.\n"
|
|
15299
|
+
},
|
|
15300
|
+
"if_version": {
|
|
15301
|
+
"type": "string",
|
|
15302
|
+
"pattern": "^[0-9]+$",
|
|
15303
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15304
|
+
}
|
|
15305
|
+
},
|
|
15306
|
+
"required": ["key", "value"]
|
|
15307
|
+
},
|
|
15308
|
+
"responseSchema": {
|
|
15309
|
+
"type": "object",
|
|
15310
|
+
"additionalProperties": false,
|
|
15311
|
+
"description": "Memory record returned by get and set operations.",
|
|
15312
|
+
"properties": {
|
|
15313
|
+
"id": {
|
|
15314
|
+
"type": "string",
|
|
15315
|
+
"format": "uuid"
|
|
15316
|
+
},
|
|
15317
|
+
"key": {
|
|
15318
|
+
"type": "string",
|
|
15319
|
+
"minLength": 1,
|
|
15320
|
+
"maxLength": 512,
|
|
15321
|
+
"description": "Caller-defined key, at most 512 UTF-8 bytes."
|
|
15322
|
+
},
|
|
15323
|
+
"scope": {
|
|
15324
|
+
"type": "object",
|
|
15325
|
+
"additionalProperties": false,
|
|
15326
|
+
"description": "Resolved memory scope returned by the API.",
|
|
15327
|
+
"properties": {
|
|
15328
|
+
"type": {
|
|
15329
|
+
"type": "string",
|
|
15330
|
+
"enum": ["org", "function"]
|
|
15331
|
+
},
|
|
15332
|
+
"id": {
|
|
15333
|
+
"type": "string",
|
|
15334
|
+
"format": "uuid",
|
|
15335
|
+
"description": "Org id for org scope, function id for function scope."
|
|
15336
|
+
}
|
|
15337
|
+
},
|
|
15338
|
+
"required": ["type", "id"]
|
|
15339
|
+
},
|
|
15340
|
+
"value": {
|
|
15341
|
+
"description": "JSON value accepted by Primitive Memories. The server accepts strings,\nnumbers, booleans, null, arrays, and objects, validates nested values,\nand rejects values that do not serialize as JSON.\n",
|
|
15342
|
+
"oneOf": [
|
|
15343
|
+
{ "type": "null" },
|
|
15344
|
+
{ "type": "string" },
|
|
15345
|
+
{ "type": "number" },
|
|
15346
|
+
{ "type": "boolean" },
|
|
15347
|
+
{
|
|
15348
|
+
"type": "array",
|
|
15349
|
+
"items": { "description": "Any nested JSON value." }
|
|
15350
|
+
},
|
|
15351
|
+
{
|
|
15352
|
+
"type": "object",
|
|
15353
|
+
"additionalProperties": { "description": "Any nested JSON value." }
|
|
15354
|
+
}
|
|
15355
|
+
]
|
|
15356
|
+
},
|
|
15357
|
+
"version": {
|
|
15358
|
+
"type": "string",
|
|
15359
|
+
"pattern": "^[0-9]+$",
|
|
15360
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15361
|
+
},
|
|
15362
|
+
"created_at": {
|
|
15363
|
+
"type": "string",
|
|
15364
|
+
"format": "date-time"
|
|
15365
|
+
},
|
|
15366
|
+
"updated_at": {
|
|
15367
|
+
"type": "string",
|
|
15368
|
+
"format": "date-time"
|
|
15369
|
+
},
|
|
15370
|
+
"last_read_at": {
|
|
15371
|
+
"type": ["string", "null"],
|
|
15372
|
+
"format": "date-time",
|
|
15373
|
+
"description": "Last successful get timestamp, or null before any get."
|
|
15374
|
+
},
|
|
15375
|
+
"read_count": {
|
|
15376
|
+
"type": "string",
|
|
15377
|
+
"pattern": "^[0-9]+$",
|
|
15378
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15379
|
+
},
|
|
15380
|
+
"write_count": {
|
|
15381
|
+
"type": "string",
|
|
15382
|
+
"pattern": "^[0-9]+$",
|
|
15383
|
+
"description": "Bigint counter serialized as a base-10 string."
|
|
15384
|
+
},
|
|
15385
|
+
"expires_at": {
|
|
15386
|
+
"type": ["string", "null"],
|
|
15387
|
+
"format": "date-time",
|
|
15388
|
+
"description": "Expiration timestamp, or null for no TTL."
|
|
15389
|
+
},
|
|
15390
|
+
"created_by": {
|
|
15391
|
+
"type": ["string", "null"],
|
|
15392
|
+
"description": "Actor that created the memory, when available."
|
|
15393
|
+
},
|
|
15394
|
+
"updated_by": {
|
|
15395
|
+
"type": ["string", "null"],
|
|
15396
|
+
"description": "Actor that last updated the memory, when available."
|
|
15397
|
+
}
|
|
15398
|
+
},
|
|
15399
|
+
"required": [
|
|
15400
|
+
"id",
|
|
15401
|
+
"key",
|
|
15402
|
+
"scope",
|
|
15403
|
+
"value",
|
|
15404
|
+
"version",
|
|
15405
|
+
"created_at",
|
|
15406
|
+
"updated_at",
|
|
15407
|
+
"last_read_at",
|
|
15408
|
+
"read_count",
|
|
15409
|
+
"write_count",
|
|
15410
|
+
"expires_at",
|
|
15411
|
+
"created_by",
|
|
15412
|
+
"updated_by"
|
|
15413
|
+
]
|
|
15414
|
+
},
|
|
15415
|
+
"sdkName": "setMemory",
|
|
15416
|
+
"summary": "Set a memory",
|
|
15417
|
+
"tag": "Memories",
|
|
15418
|
+
"tagCommand": "memories"
|
|
15419
|
+
},
|
|
15420
|
+
{
|
|
15421
|
+
"binaryResponse": false,
|
|
15422
|
+
"bodyRequired": true,
|
|
15423
|
+
"command": "create-challenge",
|
|
15424
|
+
"description": "Create an x402 payment challenge (the payee side of a payment). The\n`pay_to` address is resolved server-side from your registered default\npayout address for the network, never from the request. The response\ncarries the `nonce_binding` and `payment_requirements` the payer needs to\nsign; hand the whole challenge object to the payer (for example in an\nemail reply). Amounts are in token base units (USDC has 6 decimals, so\n`\"10000\"` is 0.01 USDC).\n",
|
|
15425
|
+
"hasJsonBody": true,
|
|
15426
|
+
"method": "POST",
|
|
15427
|
+
"operationId": "createChallenge",
|
|
15428
|
+
"path": "/x402/challenges",
|
|
15429
|
+
"pathParams": [],
|
|
15430
|
+
"queryParams": [],
|
|
15431
|
+
"requestSchema": {
|
|
15432
|
+
"type": "object",
|
|
15433
|
+
"additionalProperties": false,
|
|
15434
|
+
"properties": {
|
|
15435
|
+
"amount": {
|
|
15436
|
+
"type": "string",
|
|
15437
|
+
"pattern": "^[1-9][0-9]{0,38}$",
|
|
15438
|
+
"description": "Amount to collect, in token base units. USDC has 6 decimals, so\n`\"10000\"` is 0.01 USDC.\n"
|
|
15439
|
+
},
|
|
15440
|
+
"network": {
|
|
15441
|
+
"type": "string",
|
|
15442
|
+
"enum": ["base", "base-sepolia"]
|
|
15443
|
+
},
|
|
15444
|
+
"payer_org": {
|
|
15445
|
+
"type": "string",
|
|
15446
|
+
"format": "uuid",
|
|
15447
|
+
"description": "The org id allowed to pay this challenge (on-net binding). Optional.\n"
|
|
15448
|
+
},
|
|
15449
|
+
"expires_in": {
|
|
15450
|
+
"type": "integer",
|
|
15451
|
+
"minimum": 60,
|
|
15452
|
+
"maximum": 86400,
|
|
15453
|
+
"description": "Seconds until the challenge expires. Defaults to 3600."
|
|
15454
|
+
},
|
|
15455
|
+
"resource": {
|
|
15456
|
+
"type": "string",
|
|
15457
|
+
"format": "uri",
|
|
15458
|
+
"maxLength": 2048,
|
|
15459
|
+
"description": "Optional URL identifying what is being paid for. Defaults to a\nsynthetic `x402:challenge:<id>` identifier.\n"
|
|
15460
|
+
},
|
|
15461
|
+
"description": {
|
|
15462
|
+
"type": "string",
|
|
15463
|
+
"maxLength": 512,
|
|
14299
15464
|
"description": "Optional human-readable description of the payment."
|
|
14300
15465
|
}
|
|
14301
15466
|
},
|
|
@@ -15341,11 +16506,12 @@ const operationManifest = [
|
|
|
15341
16506
|
"properties": {
|
|
15342
16507
|
"address": {
|
|
15343
16508
|
"type": "string",
|
|
15344
|
-
"description": "The agent's globally unique email address; must route to the
|
|
16509
|
+
"description": "The agent's globally unique email address; mail to it must route to an endpoint the account controls."
|
|
15345
16510
|
},
|
|
15346
16511
|
"endpoint_id": {
|
|
15347
16512
|
"type": "string",
|
|
15348
|
-
"format": "uuid"
|
|
16513
|
+
"format": "uuid",
|
|
16514
|
+
"description": "Optional. The endpoint the agent runs on. Omit it to resolve the endpoint from the address's routing automatically; supply it to pin a specific endpoint, which is then validated against the address's route."
|
|
15349
16515
|
},
|
|
15350
16516
|
"display_name": {
|
|
15351
16517
|
"type": "string",
|
|
@@ -15369,11 +16535,7 @@ const operationManifest = [
|
|
|
15369
16535
|
"maxItems": 20
|
|
15370
16536
|
}
|
|
15371
16537
|
},
|
|
15372
|
-
"required": [
|
|
15373
|
-
"address",
|
|
15374
|
-
"endpoint_id",
|
|
15375
|
-
"display_name"
|
|
15376
|
-
]
|
|
16538
|
+
"required": ["address", "display_name"]
|
|
15377
16539
|
},
|
|
15378
16540
|
"responseSchema": {
|
|
15379
16541
|
"type": "object",
|
|
@@ -15391,6 +16553,30 @@ const operationManifest = [
|
|
|
15391
16553
|
"tag": "Registries",
|
|
15392
16554
|
"tagCommand": "registries"
|
|
15393
16555
|
},
|
|
16556
|
+
{
|
|
16557
|
+
"binaryResponse": false,
|
|
16558
|
+
"bodyRequired": false,
|
|
16559
|
+
"command": "delete-registry",
|
|
16560
|
+
"description": "Removes the registry from discovery and frees its slug for re-creation.",
|
|
16561
|
+
"hasJsonBody": false,
|
|
16562
|
+
"method": "DELETE",
|
|
16563
|
+
"operationId": "deleteRegistry",
|
|
16564
|
+
"path": "/registries/{slug}",
|
|
16565
|
+
"pathParams": [{
|
|
16566
|
+
"description": "The registry slug",
|
|
16567
|
+
"enum": null,
|
|
16568
|
+
"name": "slug",
|
|
16569
|
+
"required": true,
|
|
16570
|
+
"type": "string"
|
|
16571
|
+
}],
|
|
16572
|
+
"queryParams": [],
|
|
16573
|
+
"requestSchema": null,
|
|
16574
|
+
"responseSchema": null,
|
|
16575
|
+
"sdkName": "deleteRegistry",
|
|
16576
|
+
"summary": "Delete a registry you own",
|
|
16577
|
+
"tag": "Registries",
|
|
16578
|
+
"tagCommand": "registries"
|
|
16579
|
+
},
|
|
15394
16580
|
{
|
|
15395
16581
|
"binaryResponse": false,
|
|
15396
16582
|
"bodyRequired": false,
|
|
@@ -15424,6 +16610,11 @@ const operationManifest = [
|
|
|
15424
16610
|
"handle": {
|
|
15425
16611
|
"type": ["string", "null"],
|
|
15426
16612
|
"description": "The registry-scoped name. Null on the global by-address read."
|
|
16613
|
+
},
|
|
16614
|
+
"last_reachable_at": {
|
|
16615
|
+
"type": ["string", "null"],
|
|
16616
|
+
"format": "date-time",
|
|
16617
|
+
"description": "When the agent's address was last confirmed to still route to its endpoint. A freshness signal for ranking listings; null until the first check."
|
|
15427
16618
|
}
|
|
15428
16619
|
},
|
|
15429
16620
|
"required": [
|
|
@@ -15432,7 +16623,8 @@ const operationManifest = [
|
|
|
15432
16623
|
"title",
|
|
15433
16624
|
"description",
|
|
15434
16625
|
"tags",
|
|
15435
|
-
"handle"
|
|
16626
|
+
"handle",
|
|
16627
|
+
"last_reachable_at"
|
|
15436
16628
|
]
|
|
15437
16629
|
},
|
|
15438
16630
|
"sdkName": "getAgent",
|
|
@@ -15592,6 +16784,11 @@ const operationManifest = [
|
|
|
15592
16784
|
"handle": {
|
|
15593
16785
|
"type": ["string", "null"],
|
|
15594
16786
|
"description": "The registry-scoped name. Null on the global by-address read."
|
|
16787
|
+
},
|
|
16788
|
+
"last_reachable_at": {
|
|
16789
|
+
"type": ["string", "null"],
|
|
16790
|
+
"format": "date-time",
|
|
16791
|
+
"description": "When the agent's address was last confirmed to still route to its endpoint. A freshness signal for ranking listings; null until the first check."
|
|
15595
16792
|
}
|
|
15596
16793
|
},
|
|
15597
16794
|
"required": [
|
|
@@ -15600,7 +16797,8 @@ const operationManifest = [
|
|
|
15600
16797
|
"title",
|
|
15601
16798
|
"description",
|
|
15602
16799
|
"tags",
|
|
15603
|
-
"handle"
|
|
16800
|
+
"handle",
|
|
16801
|
+
"last_reachable_at"
|
|
15604
16802
|
]
|
|
15605
16803
|
}
|
|
15606
16804
|
},
|
|
@@ -15686,14 +16884,48 @@ const operationManifest = [
|
|
|
15686
16884
|
"queryParams": [],
|
|
15687
16885
|
"requestSchema": {
|
|
15688
16886
|
"type": "object",
|
|
16887
|
+
"description": "Publish an agent into a registry. When display_name is present the agent identity is defined (create-or-get by address) in the same call before publishing; omit the define fields to publish an already-defined agent.",
|
|
15689
16888
|
"properties": {
|
|
15690
16889
|
"address": { "type": "string" },
|
|
15691
16890
|
"handle": {
|
|
15692
16891
|
"type": "string",
|
|
15693
16892
|
"description": "The registry-scoped name to list the agent under."
|
|
16893
|
+
},
|
|
16894
|
+
"display_name": {
|
|
16895
|
+
"type": "string",
|
|
16896
|
+
"minLength": 1,
|
|
16897
|
+
"maxLength": 120,
|
|
16898
|
+
"description": "Present to define the agent identity before publishing (define + publish in one call)."
|
|
16899
|
+
},
|
|
16900
|
+
"endpoint_id": {
|
|
16901
|
+
"type": "string",
|
|
16902
|
+
"format": "uuid",
|
|
16903
|
+
"description": "Optional, only used when defining. Omit to resolve the endpoint from the address's routing."
|
|
16904
|
+
},
|
|
16905
|
+
"title": {
|
|
16906
|
+
"type": ["string", "null"],
|
|
16907
|
+
"maxLength": 120
|
|
16908
|
+
},
|
|
16909
|
+
"description": {
|
|
16910
|
+
"type": ["string", "null"],
|
|
16911
|
+
"maxLength": 2e3
|
|
16912
|
+
},
|
|
16913
|
+
"tags": {
|
|
16914
|
+
"type": "array",
|
|
16915
|
+
"items": {
|
|
16916
|
+
"type": "string",
|
|
16917
|
+
"maxLength": 40
|
|
16918
|
+
},
|
|
16919
|
+
"maxItems": 20
|
|
15694
16920
|
}
|
|
15695
16921
|
},
|
|
15696
|
-
"required": ["address", "handle"]
|
|
16922
|
+
"required": ["address", "handle"],
|
|
16923
|
+
"dependentRequired": {
|
|
16924
|
+
"endpoint_id": ["display_name"],
|
|
16925
|
+
"title": ["display_name"],
|
|
16926
|
+
"description": ["display_name"],
|
|
16927
|
+
"tags": ["display_name"]
|
|
16928
|
+
}
|
|
15697
16929
|
},
|
|
15698
16930
|
"responseSchema": {
|
|
15699
16931
|
"type": "object",
|
|
@@ -15759,6 +16991,11 @@ const operationManifest = [
|
|
|
15759
16991
|
"handle": {
|
|
15760
16992
|
"type": ["string", "null"],
|
|
15761
16993
|
"description": "The registry-scoped name. Null on the global by-address read."
|
|
16994
|
+
},
|
|
16995
|
+
"last_reachable_at": {
|
|
16996
|
+
"type": ["string", "null"],
|
|
16997
|
+
"format": "date-time",
|
|
16998
|
+
"description": "When the agent's address was last confirmed to still route to its endpoint. A freshness signal for ranking listings; null until the first check."
|
|
15762
16999
|
}
|
|
15763
17000
|
},
|
|
15764
17001
|
"required": [
|
|
@@ -15767,7 +17004,8 @@ const operationManifest = [
|
|
|
15767
17004
|
"title",
|
|
15768
17005
|
"description",
|
|
15769
17006
|
"tags",
|
|
15770
|
-
"handle"
|
|
17007
|
+
"handle",
|
|
17008
|
+
"last_reachable_at"
|
|
15771
17009
|
]
|
|
15772
17010
|
},
|
|
15773
17011
|
"sdkName": "resolveRegistryHandle",
|