primitive-functions 0.3.0-alpha.16 → 0.3.0-alpha.17

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.
Files changed (4) hide show
  1. package/README.md +3 -3
  2. package/index.d.ts +764 -264
  3. package/index.js +32 -0
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -83,6 +83,22 @@ export function requireDocumentOwner(_documentIdOf) {
83
83
  throw new Error(NOT_PROVIDED);
84
84
  }
85
85
 
86
+ export function requirePublicDb3(_db3IdOf, _type) {
87
+ throw new Error(NOT_PROVIDED);
88
+ }
89
+
90
+ export function requireDb3Level(_db3IdOf, _type, _minLevel, _options) {
91
+ throw new Error(NOT_PROVIDED);
92
+ }
93
+
94
+ export function requireToken(_tokenOf) {
95
+ throw new Error(NOT_PROVIDED);
96
+ }
97
+
98
+ export function requireInvitation(_tokenOf) {
99
+ throw new Error(NOT_PROVIDED);
100
+ }
101
+
86
102
  /**
87
103
  * The platform's cap on a registered query's cache TTL. The stub carries the
88
104
  * value rather than throwing, because it is a constant an author may read at
@@ -128,6 +144,16 @@ export function vectorBytes() {
128
144
  throw new Error(NOT_PROVIDED);
129
145
  }
130
146
 
147
+ /** A value as a db3 JSON field's canonical text. The platform copy encodes; this refuses. */
148
+ export function encodeDb3Json() {
149
+ throw new Error(NOT_PROVIDED);
150
+ }
151
+
152
+ /** A db3 JSON field's stored text as its value. The platform copy decodes; this refuses. */
153
+ export function decodeDb3Json() {
154
+ throw new Error(NOT_PROVIDED);
155
+ }
156
+
131
157
  /**
132
158
  * The per-family durable step policies. The stub carries an empty shape rather
133
159
  * than throwing: it is read at module scope by code that only type-checks.
@@ -198,6 +224,10 @@ export default {
198
224
  requireMember,
199
225
  requireCollectionRole,
200
226
  requireDocumentOwner,
227
+ requirePublicDb3,
228
+ requireDb3Level,
229
+ requireToken,
230
+ requireInvitation,
201
231
  defineQuery,
202
232
  defineMutation,
203
233
  pMap,
@@ -205,6 +235,8 @@ export default {
205
235
  encodeVector,
206
236
  decodeVector,
207
237
  vectorBytes,
238
+ encodeDb3Json,
239
+ decodeDb3Json,
208
240
  assertRuntime,
209
241
  assertTrigger,
210
242
  FunctionRuntimeError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primitive-functions",
3
- "version": "0.3.0-alpha.16",
3
+ "version": "0.3.0-alpha.17",
4
4
  "description": "The module a Primitive server function imports. Supplied by the platform at invoke time; reserved here so the name is ours before the runtime lands.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Primitive LLC",