@vllnt/convex-push 0.0.0-stage → 0.1.0-canary.4a1ca91

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 (152) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +21 -0
  3. package/README.md +415 -2
  4. package/dist/client/index.d.ts +180 -0
  5. package/dist/client/index.d.ts.map +1 -0
  6. package/dist/client/index.js +152 -0
  7. package/dist/client/index.js.map +1 -0
  8. package/dist/component/_generated/api.d.ts +80 -0
  9. package/dist/component/_generated/api.d.ts.map +1 -0
  10. package/dist/component/_generated/api.js +31 -0
  11. package/dist/component/_generated/api.js.map +1 -0
  12. package/dist/component/_generated/component.d.ts +274 -0
  13. package/dist/component/_generated/component.d.ts.map +1 -0
  14. package/dist/component/_generated/component.js +11 -0
  15. package/dist/component/_generated/component.js.map +1 -0
  16. package/dist/component/_generated/dataModel.d.ts +46 -0
  17. package/dist/component/_generated/dataModel.d.ts.map +1 -0
  18. package/dist/component/_generated/dataModel.js +11 -0
  19. package/dist/component/_generated/dataModel.js.map +1 -0
  20. package/dist/component/_generated/server.d.ts +142 -0
  21. package/dist/component/_generated/server.d.ts.map +1 -0
  22. package/dist/component/_generated/server.js +80 -0
  23. package/dist/component/_generated/server.js.map +1 -0
  24. package/dist/component/actions.d.ts +29 -0
  25. package/dist/component/actions.d.ts.map +1 -0
  26. package/dist/component/actions.js +29 -0
  27. package/dist/component/actions.js.map +1 -0
  28. package/dist/component/checks.d.ts +27 -0
  29. package/dist/component/checks.d.ts.map +1 -0
  30. package/dist/component/checks.js +107 -0
  31. package/dist/component/checks.js.map +1 -0
  32. package/dist/component/convex.config.d.ts +18 -0
  33. package/dist/component/convex.config.d.ts.map +1 -0
  34. package/dist/component/convex.config.js +30 -0
  35. package/dist/component/convex.config.js.map +1 -0
  36. package/dist/component/crons.d.ts +8 -0
  37. package/dist/component/crons.d.ts.map +1 -0
  38. package/dist/component/crons.js +15 -0
  39. package/dist/component/crons.js.map +1 -0
  40. package/dist/component/crypto/codec.d.ts +64 -0
  41. package/dist/component/crypto/codec.d.ts.map +1 -0
  42. package/dist/component/crypto/codec.js +102 -0
  43. package/dist/component/crypto/codec.js.map +1 -0
  44. package/dist/component/crypto/jwt.d.ts +46 -0
  45. package/dist/component/crypto/jwt.d.ts.map +1 -0
  46. package/dist/component/crypto/jwt.js +82 -0
  47. package/dist/component/crypto/jwt.js.map +1 -0
  48. package/dist/component/crypto/token_seal.d.ts +31 -0
  49. package/dist/component/crypto/token_seal.d.ts.map +1 -0
  50. package/dist/component/crypto/token_seal.js +44 -0
  51. package/dist/component/crypto/token_seal.js.map +1 -0
  52. package/dist/component/crypto/web_push_crypto.d.ts +42 -0
  53. package/dist/component/crypto/web_push_crypto.d.ts.map +1 -0
  54. package/dist/component/crypto/web_push_crypto.js +49 -0
  55. package/dist/component/crypto/web_push_crypto.js.map +1 -0
  56. package/dist/component/internal_mutations.d.ts +48 -0
  57. package/dist/component/internal_mutations.d.ts.map +1 -0
  58. package/dist/component/internal_mutations.js +82 -0
  59. package/dist/component/internal_mutations.js.map +1 -0
  60. package/dist/component/mutations.d.ts +223 -0
  61. package/dist/component/mutations.d.ts.map +1 -0
  62. package/dist/component/mutations.js +244 -0
  63. package/dist/component/mutations.js.map +1 -0
  64. package/dist/component/providers/apns.d.ts +46 -0
  65. package/dist/component/providers/apns.d.ts.map +1 -0
  66. package/dist/component/providers/apns.js +105 -0
  67. package/dist/component/providers/apns.js.map +1 -0
  68. package/dist/component/providers/fcm.d.ts +36 -0
  69. package/dist/component/providers/fcm.d.ts.map +1 -0
  70. package/dist/component/providers/fcm.js +116 -0
  71. package/dist/component/providers/fcm.js.map +1 -0
  72. package/dist/component/providers/http.d.ts +45 -0
  73. package/dist/component/providers/http.d.ts.map +1 -0
  74. package/dist/component/providers/http.js +74 -0
  75. package/dist/component/providers/http.js.map +1 -0
  76. package/dist/component/providers/keys.d.ts +70 -0
  77. package/dist/component/providers/keys.d.ts.map +1 -0
  78. package/dist/component/providers/keys.js +89 -0
  79. package/dist/component/providers/keys.js.map +1 -0
  80. package/dist/component/providers/payload.d.ts +83 -0
  81. package/dist/component/providers/payload.d.ts.map +1 -0
  82. package/dist/component/providers/payload.js +162 -0
  83. package/dist/component/providers/payload.js.map +1 -0
  84. package/dist/component/providers/token_cache.d.ts +56 -0
  85. package/dist/component/providers/token_cache.d.ts.map +1 -0
  86. package/dist/component/providers/token_cache.js +42 -0
  87. package/dist/component/providers/token_cache.js.map +1 -0
  88. package/dist/component/providers/web_push.d.ts +40 -0
  89. package/dist/component/providers/web_push.d.ts.map +1 -0
  90. package/dist/component/providers/web_push.js +94 -0
  91. package/dist/component/providers/web_push.js.map +1 -0
  92. package/dist/component/queries.d.ts +132 -0
  93. package/dist/component/queries.d.ts.map +1 -0
  94. package/dist/component/queries.js +156 -0
  95. package/dist/component/queries.js.map +1 -0
  96. package/dist/component/queue.d.ts +66 -0
  97. package/dist/component/queue.d.ts.map +1 -0
  98. package/dist/component/queue.js +356 -0
  99. package/dist/component/queue.js.map +1 -0
  100. package/dist/component/registry.d.ts +46 -0
  101. package/dist/component/registry.d.ts.map +1 -0
  102. package/dist/component/registry.js +128 -0
  103. package/dist/component/registry.js.map +1 -0
  104. package/dist/component/schema.d.ts +286 -0
  105. package/dist/component/schema.d.ts.map +1 -0
  106. package/dist/component/schema.js +70 -0
  107. package/dist/component/schema.js.map +1 -0
  108. package/dist/component/senders.d.ts +67 -0
  109. package/dist/component/senders.d.ts.map +1 -0
  110. package/dist/component/senders.js +123 -0
  111. package/dist/component/senders.js.map +1 -0
  112. package/dist/component/validators.d.ts +784 -0
  113. package/dist/component/validators.d.ts.map +1 -0
  114. package/dist/component/validators.js +193 -0
  115. package/dist/component/validators.js.map +1 -0
  116. package/dist/shared.d.ts +109 -0
  117. package/dist/shared.d.ts.map +1 -0
  118. package/dist/shared.js +131 -0
  119. package/dist/shared.js.map +1 -0
  120. package/docs/API.md +258 -0
  121. package/llms.txt +33 -0
  122. package/package.json +125 -4
  123. package/src/client/index.ts +276 -0
  124. package/src/component/_generated/api.ts +96 -0
  125. package/src/component/_generated/component.ts +263 -0
  126. package/src/component/_generated/dataModel.ts +60 -0
  127. package/src/component/_generated/server.ts +178 -0
  128. package/src/component/actions.ts +31 -0
  129. package/src/component/checks.ts +117 -0
  130. package/src/component/convex.config.ts +32 -0
  131. package/src/component/crons.ts +17 -0
  132. package/src/component/crypto/codec.ts +113 -0
  133. package/src/component/crypto/jwt.ts +109 -0
  134. package/src/component/crypto/token_seal.ts +56 -0
  135. package/src/component/crypto/web_push_crypto.ts +75 -0
  136. package/src/component/internal_mutations.ts +88 -0
  137. package/src/component/mutations.ts +257 -0
  138. package/src/component/providers/apns.ts +116 -0
  139. package/src/component/providers/fcm.ts +132 -0
  140. package/src/component/providers/http.ts +78 -0
  141. package/src/component/providers/keys.ts +133 -0
  142. package/src/component/providers/payload.ts +200 -0
  143. package/src/component/providers/token_cache.ts +75 -0
  144. package/src/component/providers/web_push.ts +101 -0
  145. package/src/component/queries.ts +182 -0
  146. package/src/component/queue.ts +425 -0
  147. package/src/component/registry.ts +144 -0
  148. package/src/component/schema.ts +82 -0
  149. package/src/component/senders.ts +152 -0
  150. package/src/component/validators.ts +285 -0
  151. package/src/shared.ts +155 -0
  152. package/src/test.ts +25 -0
@@ -0,0 +1,152 @@
1
+ import { createFunctionHandle, } from "convex/server";
2
+ import { ConvexError } from "convex/values";
3
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_MAX_PARALLELISM, DEFAULT_PRUNE_BATCH, DEFAULT_RETENTION_MS, } from "../shared.js";
4
+ export { appConfig, customSendArgs, data, deliveryEvent, deliveryView, deviceAddress, deviceView, messageStatus, messageSummary, overrides, sendResult, } from "../component/validators.js";
5
+ export * from "../shared.js";
6
+ function clientError(code, message) {
7
+ throw new ConvexError({ code, message });
8
+ }
9
+ /**
10
+ * Typed entry point to a mounted push component.
11
+ *
12
+ * @example
13
+ * const push = new Push(components.push, {
14
+ * apps: { ios: { platform: "apns", topic: "com.example.app", environment: "production" } },
15
+ * });
16
+ * await push.send(ctx, { to: { subjectRef: userId }, title: "Support replied", body: preview });
17
+ */
18
+ export class Push {
19
+ component;
20
+ options;
21
+ /**
22
+ * @param component - `components.push` from the host's `_generated/api`.
23
+ * @param options - Apps, providers, hook and defaults.
24
+ */
25
+ constructor(component, options) {
26
+ this.component = component;
27
+ this.options = options;
28
+ }
29
+ async config() {
30
+ const providers = await Promise.all(Object.entries(this.options.providers ?? {}).map(async ([provider, { send }]) => ({
31
+ provider,
32
+ handle: await createFunctionHandle(send),
33
+ })));
34
+ return {
35
+ apps: Object.entries(this.options.apps).map(([appRef, app]) => ({ appRef, app })),
36
+ providers,
37
+ onDeliveryHandle: this.options.onDelivery ? await createFunctionHandle(this.options.onDelivery) : undefined,
38
+ maxAttempts: this.options.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
39
+ maxParallelism: this.options.maxParallelism ?? DEFAULT_MAX_PARALLELISM,
40
+ scrub: this.options.scrubContent ?? true,
41
+ };
42
+ }
43
+ withDefaults(message) {
44
+ return { ...message, ttlSeconds: message.ttlSeconds ?? this.options.defaultTtlSeconds };
45
+ }
46
+ /**
47
+ * Register or refresh a device. The host resolves `subjectRef` from its own auth.
48
+ * @param ctx - A mutation context.
49
+ * @param args - Owner, app, address and optional install id and locale.
50
+ * @returns The device id and whether a new row was created.
51
+ * @throws `UNKNOWN_APP` when `appRef` is not in `apps`; `PLATFORM_MISMATCH` when the address does not fit the app.
52
+ */
53
+ async register(ctx, args) {
54
+ const app = this.options.apps[args.appRef];
55
+ if (!app)
56
+ return clientError("UNKNOWN_APP", `appRef "${args.appRef}" is not configured`);
57
+ const fits = app.platform === args.address.platform &&
58
+ (app.platform !== "custom" || (args.address.platform === "custom" && args.address.provider === app.provider));
59
+ if (!fits)
60
+ return clientError("PLATFORM_MISMATCH", `the address does not fit appRef "${args.appRef}"`);
61
+ return ctx.runMutation(this.component.mutations.register, { ...args });
62
+ }
63
+ /**
64
+ * Remove a device, for example on logout.
65
+ * @param ctx - A mutation context.
66
+ * @param args - `deviceId` or `address`, and optionally the owner to check.
67
+ * @returns Whether a device was removed.
68
+ */
69
+ async unregister(ctx, args) {
70
+ return ctx.runMutation(this.component.mutations.unregister, args);
71
+ }
72
+ /**
73
+ * Pause or resume one device.
74
+ * @param ctx - A mutation context.
75
+ * @param args - Device, new status, and optionally the owner to check.
76
+ * @returns Whether the device was updated.
77
+ */
78
+ async setDeviceStatus(ctx, args) {
79
+ return ctx.runMutation(this.component.mutations.setDeviceStatus, args);
80
+ }
81
+ /**
82
+ * List a subject's devices. Addresses are never returned.
83
+ * @param ctx - Any context that can run queries.
84
+ * @param args - Owner, optional status filter and limit (default 20, max 100).
85
+ * @returns Device views.
86
+ */
87
+ async listDevices(ctx, args) {
88
+ return ctx.runQuery(this.component.queries.listDevices, args);
89
+ }
90
+ /**
91
+ * Enqueue one message. Call it from a mutation: if the mutation fails, nothing is queued.
92
+ * @param ctx - A mutation context.
93
+ * @param message - Recipient, content, options, overrides and idempotency key.
94
+ * @returns The message id, how many deliveries were created, and whether the idempotency key matched an earlier send.
95
+ */
96
+ async send(ctx, message) {
97
+ return ctx.runMutation(this.component.mutations.send, { message: this.withDefaults(message), config: await this.config() });
98
+ }
99
+ /**
100
+ * Enqueue up to 100 messages and 100 deliveries in one transaction. Over
101
+ * that it throws `INVALID_ARGUMENT` and queues nothing.
102
+ * @param ctx - A mutation context.
103
+ * @param messages - The messages.
104
+ * @returns One result per message, in order.
105
+ */
106
+ async sendBatch(ctx, messages) {
107
+ return ctx.runMutation(this.component.mutations.sendBatch, {
108
+ messages: messages.map((m) => this.withDefaults(m)),
109
+ config: await this.config(),
110
+ });
111
+ }
112
+ /**
113
+ * A message's delivery state. Reactive in a query. Never returns content.
114
+ * @param ctx - Any context that can run queries.
115
+ * @param messageId - The id `send` returned.
116
+ * @returns The status, or `null` for an unknown id.
117
+ */
118
+ async status(ctx, messageId) {
119
+ return ctx.runQuery(this.component.queries.status, { messageId });
120
+ }
121
+ /**
122
+ * A subject's recent messages, newest first, with delivery counts.
123
+ * @param ctx - Any context that can run queries.
124
+ * @param args - Subject and optional limit (default 20, max 100).
125
+ * @returns Message summaries.
126
+ */
127
+ async listBySubject(ctx, args) {
128
+ return ctx.runQuery(this.component.queries.listBySubject, args);
129
+ }
130
+ /**
131
+ * Cancel a message's queued deliveries.
132
+ * @param ctx - A mutation context.
133
+ * @param messageId - The message.
134
+ * @returns How many deliveries were cancelled.
135
+ */
136
+ async cancel(ctx, messageId) {
137
+ return ctx.runMutation(this.component.mutations.cancel, { messageId });
138
+ }
139
+ /**
140
+ * Delete data older than the retention window. The component also runs this daily with the default window.
141
+ * @param ctx - A mutation context.
142
+ * @param args - Optional batch size.
143
+ * @returns Rows deleted, and whether another pass was scheduled.
144
+ */
145
+ async prune(ctx, args = {}) {
146
+ return ctx.runMutation(this.component.mutations.prune, {
147
+ retentionMs: this.options.retentionMs ?? DEFAULT_RETENTION_MS,
148
+ batch: args.batch ?? DEFAULT_PRUNE_BATCH,
149
+ });
150
+ }
151
+ }
152
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAOrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,cAAc,CAAC;AActB,OAAO,EACL,SAAS,EACT,cAAc,EACd,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,4BAA4B,CAAC;AAepC,cAAc,cAAc,CAAC;AA8C7B,SAAS,WAAW,CAAC,IAAyC,EAAE,OAAe;IAC7E,MAAM,IA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W,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,CAAC,GAAmB,EAAE,IAAI,GAAuB,EAAE;QAC5D,OAAO,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,EAAE;YACrD,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,oBAAoB;YAC7D,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,mBAAmB;SACzC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Generated `api` utility.
3
+ *
4
+ * THIS CODE IS AUTOMATICALLY GENERATED.
5
+ *
6
+ * To regenerate, run `npx convex dev`.
7
+ * @module
8
+ */
9
+ import type * as actions from "../actions.js";
10
+ import type * as checks from "../checks.js";
11
+ import type * as crons from "../crons.js";
12
+ import type * as crypto_codec from "../crypto/codec.js";
13
+ import type * as crypto_jwt from "../crypto/jwt.js";
14
+ import type * as crypto_token_seal from "../crypto/token_seal.js";
15
+ import type * as crypto_web_push_crypto from "../crypto/web_push_crypto.js";
16
+ import type * as internal_mutations from "../internal_mutations.js";
17
+ import type * as mutations from "../mutations.js";
18
+ import type * as providers_apns from "../providers/apns.js";
19
+ import type * as providers_fcm from "../providers/fcm.js";
20
+ import type * as providers_http from "../providers/http.js";
21
+ import type * as providers_keys from "../providers/keys.js";
22
+ import type * as providers_payload from "../providers/payload.js";
23
+ import type * as providers_token_cache from "../providers/token_cache.js";
24
+ import type * as providers_web_push from "../providers/web_push.js";
25
+ import type * as queries from "../queries.js";
26
+ import type * as queue from "../queue.js";
27
+ import type * as registry from "../registry.js";
28
+ import type * as senders from "../senders.js";
29
+ import type * as validators from "../validators.js";
30
+ import type { ApiFromModules, FilterApi, FunctionReference } from "convex/server";
31
+ declare const fullApi: ApiFromModules<{
32
+ actions: typeof actions;
33
+ checks: typeof checks;
34
+ crons: typeof crons;
35
+ "crypto/codec": typeof crypto_codec;
36
+ "crypto/jwt": typeof crypto_jwt;
37
+ "crypto/token_seal": typeof crypto_token_seal;
38
+ "crypto/web_push_crypto": typeof crypto_web_push_crypto;
39
+ internal_mutations: typeof internal_mutations;
40
+ mutations: typeof mutations;
41
+ "providers/apns": typeof providers_apns;
42
+ "providers/fcm": typeof providers_fcm;
43
+ "providers/http": typeof providers_http;
44
+ "providers/keys": typeof providers_keys;
45
+ "providers/payload": typeof providers_payload;
46
+ "providers/token_cache": typeof providers_token_cache;
47
+ "providers/web_push": typeof providers_web_push;
48
+ queries: typeof queries;
49
+ queue: typeof queue;
50
+ registry: typeof registry;
51
+ senders: typeof senders;
52
+ validators: typeof validators;
53
+ }>;
54
+ /**
55
+ * A utility for referencing Convex functions in your app's public API.
56
+ *
57
+ * Usage:
58
+ * ```js
59
+ * const myFunctionReference = api.myModule.myFunction;
60
+ * ```
61
+ */
62
+ export declare const api: FilterApi<typeof fullApi, FunctionReference<any, "public">>;
63
+ /**
64
+ * A utility for referencing Convex functions in your app's internal API.
65
+ *
66
+ * Usage:
67
+ * ```js
68
+ * const myFunctionReference = internal.myModule.myFunction;
69
+ * ```
70
+ */
71
+ export declare const internal: FilterApi<typeof fullApi, FunctionReference<any, "internal">>;
72
+ export declare const components: {
73
+ apnsPool: import("@convex-dev/workpool/_generated/component.js").ComponentApi<"apnsPool">;
74
+ fcmPool: import("@convex-dev/workpool/_generated/component.js").ComponentApi<"fcmPool">;
75
+ webpushPool: import("@convex-dev/workpool/_generated/component.js").ComponentApi<"webpushPool">;
76
+ customPool: import("@convex-dev/workpool/_generated/component.js").ComponentApi<"customPool">;
77
+ rateLimiter: import("@convex-dev/rate-limiter/_generated/component.js").ComponentApi<"rateLimiter">;
78
+ };
79
+ export {};
80
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources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8CAA8C,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACxF,WAAW,EAAE,OAAO,8CAA8C,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IAChG,UAAU,EAAE,OAAO,8CAA8C,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IAC9F,WAAW,EAAE,OAAO,kDAAkD,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;CACrG,CAAC"}
@@ -0,0 +1,31 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated `api` utility.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+ import { anyApi, componentsGeneric } from "convex/server";
11
+ const fullApi = anyApi;
12
+ /**
13
+ * A utility for referencing Convex functions in your app's public API.
14
+ *
15
+ * Usage:
16
+ * ```js
17
+ * const myFunctionReference = api.myModule.myFunction;
18
+ * ```
19
+ */
20
+ export const api = anyApi;
21
+ /**
22
+ * A utility for referencing Convex functions in your app's internal API.
23
+ *
24
+ * Usage:
25
+ * ```js
26
+ * const myFunctionReference = internal.myModule.myFunction;
27
+ * ```
28
+ */
29
+ export const internal = anyApi;
30
+ export const components = componentsGeneric();
31
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/component/_generated/api.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG;AA6BH,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,OAAO,GAsBR,MAAa,CAAC;AAEnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,GAAG,GAGZ,MAAa,CAAC;AAElB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAGjB,MAAa,CAAC;AAElB,MAAM,CAAC,MAAM,UAAU,GAAG,iBAAiB,EAM1C,CAAC"}
@@ -0,0 +1,274 @@
1
+ /**
2
+ * Generated `ComponentApi` utility.
3
+ *
4
+ * THIS CODE IS AUTOMATICALLY GENERATED.
5
+ *
6
+ * To regenerate, run `npx convex dev`.
7
+ * @module
8
+ */
9
+ import type { FunctionReference } from "convex/server";
10
+ /**
11
+ * A utility for referencing a Convex component's exposed API.
12
+ *
13
+ * Useful when expecting a parameter like `components.myComponent`.
14
+ * Usage:
15
+ * ```ts
16
+ * async function myFunction(ctx: QueryCtx, component: ComponentApi) {
17
+ * return ctx.runQuery(component.someFile.someQuery, { ...args });
18
+ * }
19
+ * ```
20
+ */
21
+ export type ComponentApi<Name extends string | undefined = string | undefined> = {
22
+ mutations: {
23
+ cancel: FunctionReference<"mutation", "internal", {
24
+ messageId: string;
25
+ }, {
26
+ cancelled: number;
27
+ }, Name>;
28
+ prune: FunctionReference<"mutation", "internal", {
29
+ batch?: number;
30
+ retentionMs?: number;
31
+ }, {
32
+ deleted: number;
33
+ more: boolean;
34
+ }, Name>;
35
+ register: FunctionReference<"mutation", "internal", {
36
+ address: {
37
+ platform: "apns";
38
+ token: string;
39
+ } | {
40
+ platform: "fcm";
41
+ token: string;
42
+ } | {
43
+ auth: string;
44
+ endpoint: string;
45
+ p256dh: string;
46
+ platform: "webpush";
47
+ } | {
48
+ address: string;
49
+ platform: "custom";
50
+ provider: string;
51
+ };
52
+ appRef: string;
53
+ installRef?: string;
54
+ locale?: string;
55
+ subjectRef: string;
56
+ }, {
57
+ created: boolean;
58
+ deviceId: string;
59
+ }, Name>;
60
+ send: FunctionReference<"mutation", "internal", {
61
+ config: {
62
+ apps: Array<{
63
+ app: {
64
+ environment: "production" | "sandbox";
65
+ platform: "apns";
66
+ topic: string;
67
+ } | {
68
+ platform: "fcm";
69
+ } | {
70
+ platform: "webpush";
71
+ } | {
72
+ platform: "custom";
73
+ provider: string;
74
+ };
75
+ appRef: string;
76
+ }>;
77
+ maxAttempts: number;
78
+ maxParallelism: number;
79
+ onDeliveryHandle?: string;
80
+ providers: Array<{
81
+ handle: string;
82
+ provider: string;
83
+ }>;
84
+ scrub: boolean;
85
+ };
86
+ message: {
87
+ badge?: number;
88
+ body?: string;
89
+ category?: string;
90
+ collapseKey?: string;
91
+ data?: Record<string, string | number | boolean>;
92
+ idempotencyKey?: string;
93
+ overrides?: {
94
+ apns?: {
95
+ interruptionLevel?: "passive" | "active" | "time-sensitive" | "critical";
96
+ mutableContent?: boolean;
97
+ rawJson?: string;
98
+ threadId?: string;
99
+ };
100
+ fcm?: {
101
+ channelId?: string;
102
+ rawJson?: string;
103
+ };
104
+ webpush?: {
105
+ icon?: string;
106
+ rawJson?: string;
107
+ url?: string;
108
+ };
109
+ };
110
+ priority?: "high" | "normal";
111
+ sound?: string;
112
+ title?: string;
113
+ to: {
114
+ subjectRef: string;
115
+ } | {
116
+ deviceIds: Array<string>;
117
+ };
118
+ ttlSeconds?: number;
119
+ };
120
+ }, {
121
+ deduplicated: boolean;
122
+ deliveries: number;
123
+ messageId: string;
124
+ }, Name>;
125
+ sendBatch: FunctionReference<"mutation", "internal", {
126
+ config: {
127
+ apps: Array<{
128
+ app: {
129
+ environment: "production" | "sandbox";
130
+ platform: "apns";
131
+ topic: string;
132
+ } | {
133
+ platform: "fcm";
134
+ } | {
135
+ platform: "webpush";
136
+ } | {
137
+ platform: "custom";
138
+ provider: string;
139
+ };
140
+ appRef: string;
141
+ }>;
142
+ maxAttempts: number;
143
+ maxParallelism: number;
144
+ onDeliveryHandle?: string;
145
+ providers: Array<{
146
+ handle: string;
147
+ provider: string;
148
+ }>;
149
+ scrub: boolean;
150
+ };
151
+ messages: Array<{
152
+ badge?: number;
153
+ body?: string;
154
+ category?: string;
155
+ collapseKey?: string;
156
+ data?: Record<string, string | number | boolean>;
157
+ idempotencyKey?: string;
158
+ overrides?: {
159
+ apns?: {
160
+ interruptionLevel?: "passive" | "active" | "time-sensitive" | "critical";
161
+ mutableContent?: boolean;
162
+ rawJson?: string;
163
+ threadId?: string;
164
+ };
165
+ fcm?: {
166
+ channelId?: string;
167
+ rawJson?: string;
168
+ };
169
+ webpush?: {
170
+ icon?: string;
171
+ rawJson?: string;
172
+ url?: string;
173
+ };
174
+ };
175
+ priority?: "high" | "normal";
176
+ sound?: string;
177
+ title?: string;
178
+ to: {
179
+ subjectRef: string;
180
+ } | {
181
+ deviceIds: Array<string>;
182
+ };
183
+ ttlSeconds?: number;
184
+ }>;
185
+ }, Array<{
186
+ deduplicated: boolean;
187
+ deliveries: number;
188
+ messageId: string;
189
+ }>, Name>;
190
+ setDeviceStatus: FunctionReference<"mutation", "internal", {
191
+ deviceId: string;
192
+ status: "active" | "disabled";
193
+ subjectRef?: string;
194
+ }, {
195
+ updated: boolean;
196
+ }, Name>;
197
+ unregister: FunctionReference<"mutation", "internal", {
198
+ address?: {
199
+ platform: "apns";
200
+ token: string;
201
+ } | {
202
+ platform: "fcm";
203
+ token: string;
204
+ } | {
205
+ auth: string;
206
+ endpoint: string;
207
+ p256dh: string;
208
+ platform: "webpush";
209
+ } | {
210
+ address: string;
211
+ platform: "custom";
212
+ provider: string;
213
+ };
214
+ deviceId?: string;
215
+ subjectRef?: string;
216
+ }, {
217
+ removed: boolean;
218
+ }, Name>;
219
+ };
220
+ queries: {
221
+ listBySubject: FunctionReference<"query", "internal", {
222
+ limit?: number;
223
+ subjectRef: string;
224
+ }, Array<{
225
+ createdAt: number;
226
+ expiresAt: number;
227
+ failed: number;
228
+ invalid: number;
229
+ messageId: string;
230
+ queued: number;
231
+ scrubbedAt?: number;
232
+ sent: number;
233
+ }>, Name>;
234
+ listDevices: FunctionReference<"query", "internal", {
235
+ limit?: number;
236
+ status?: "active" | "disabled" | "invalid";
237
+ subjectRef: string;
238
+ }, Array<{
239
+ appRef: string;
240
+ deviceId: string;
241
+ installRef?: string;
242
+ invalidCode?: string;
243
+ lastSeenAt: number;
244
+ locale?: string;
245
+ platform: "apns" | "fcm" | "webpush" | "custom";
246
+ provider?: string;
247
+ status: "active" | "disabled" | "invalid";
248
+ subjectRef: string;
249
+ }>, Name>;
250
+ status: FunctionReference<"query", "internal", {
251
+ messageId: string;
252
+ }, {
253
+ createdAt: number;
254
+ deliveries: Array<{
255
+ attempts: number;
256
+ deliveryId: string;
257
+ deviceId: string;
258
+ errorCode?: string;
259
+ httpStatus?: number;
260
+ nextAttemptAt?: number;
261
+ platform: "apns" | "fcm" | "webpush" | "custom";
262
+ provider?: string;
263
+ providerMessageId?: string;
264
+ sentAt?: number;
265
+ status: "queued" | "sent" | "failed" | "invalid";
266
+ updatedAt: number;
267
+ }>;
268
+ expiresAt: number;
269
+ messageId: string;
270
+ scrubbedAt?: number;
271
+ } | null, Name>;
272
+ };
273
+ };
274
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/component/_generated/component.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,SAAS,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,IAC3E;IACE,SAAS,EAAE;QACT,MAAM,EAAE,iBAAiB,CACvB,UAAU,EACV,UAAU,EACV;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,EACrB;YAAE,SAAS,EAAE,MAAM,CAAA;SAAE,EACrB,IAAI,CACL,CAAC;QACF,KAAK,EAAE,iBAAiB,CACtB,UAAU,EACV,UAAU,EACV;YAAE,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,EACxC;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,OAAO,CAAA;SAAE,EAClC,IAAI,CACL,CAAC;QACF,QAAQ,EAAE,iBAAiB,CACzB,UAAU,EACV,UAAU,EACV;YACE,OAAO,EACH;gBAAE,QAAQ,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAA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AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/component/_generated/component.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Generated data model types.
3
+ *
4
+ * THIS CODE IS AUTOMATICALLY GENERATED.
5
+ *
6
+ * To regenerate, run `npx convex dev`.
7
+ * @module
8
+ */
9
+ import type { DataModelFromSchemaDefinition, DocumentByName, TableNamesInDataModel, SystemTableNames } from "convex/server";
10
+ import type { GenericId } from "convex/values";
11
+ import schema from "../schema.js";
12
+ /**
13
+ * The names of all of your Convex tables.
14
+ */
15
+ export type TableNames = TableNamesInDataModel<DataModel>;
16
+ /**
17
+ * The type of a document stored in Convex.
18
+ *
19
+ * @typeParam TableName - A string literal type of the table name (like "users").
20
+ */
21
+ export type Doc<TableName extends TableNames> = DocumentByName<DataModel, TableName>;
22
+ /**
23
+ * An identifier for a document in Convex.
24
+ *
25
+ * Convex documents are uniquely identified by their `Id`, which is accessible
26
+ * on the `_id` field. To learn more, see [Document IDs](https://docs.convex.dev/using/document-ids).
27
+ *
28
+ * Documents can be loaded using `db.get(tableName, id)` in query and mutation functions.
29
+ *
30
+ * IDs are just strings at runtime, but this type can be used to distinguish them from other
31
+ * strings when type checking.
32
+ *
33
+ * @typeParam TableName - A string literal type of the table name (like "users").
34
+ */
35
+ export type Id<TableName extends TableNames | SystemTableNames> = GenericId<TableName>;
36
+ /**
37
+ * A type describing your Convex data model.
38
+ *
39
+ * This type includes information about what tables you have, the type of
40
+ * documents stored in those tables, and the indexes defined on them.
41
+ *
42
+ * This type is used to parameterize methods like `queryGeneric` and
43
+ * `mutationGeneric` to make them type-safe.
44
+ */
45
+ export type DataModel = DataModelFromSchemaDefinition<typeof schema>;
46
+ //# sourceMappingURL=dataModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataModel.d.ts","sourceRoot":"","sources":["../../../src/component/_generated/dataModel.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,6BAA6B,EAC7B,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,GAAG,CAAC,SAAS,SAAS,UAAU,IAAI,cAAc,CAC5D,SAAS,EACT,SAAS,CACV,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,EAAE,CAAC,SAAS,SAAS,UAAU,GAAG,gBAAgB,IAC5D,SAAS,CAAC,SAAS,CAAC,CAAC;AAEvB;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,6BAA6B,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * Generated data model types.
4
+ *
5
+ * THIS CODE IS AUTOMATICALLY GENERATED.
6
+ *
7
+ * To regenerate, run `npx convex dev`.
8
+ * @module
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=dataModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataModel.js","sourceRoot":"","sources":["../../../src/component/_generated/dataModel.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;;;;GAOG"}