@ttt-productions/q-core 0.1.53 → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/media.d.ts +0 -3
- package/dist/constants/media.d.ts.map +1 -1
- package/dist/constants/media.js +0 -5
- package/dist/constants/media.js.map +1 -1
- package/dist/doc-schemas/index.d.ts +0 -1
- package/dist/doc-schemas/index.d.ts.map +1 -1
- package/dist/doc-schemas/index.js +0 -1
- package/dist/doc-schemas/index.js.map +1 -1
- package/dist/doc-schemas/pending-media.d.ts +24 -0
- package/dist/doc-schemas/pending-media.d.ts.map +1 -1
- package/dist/doc-schemas/pending-media.js +6 -1
- package/dist/doc-schemas/pending-media.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +6 -23
- package/dist/doc-schemas/registry.d.ts.map +1 -1
- package/dist/doc-schemas/registry.js +0 -3
- package/dist/doc-schemas/registry.js.map +1 -1
- package/dist/domain-events/domain-events.d.ts +7 -0
- package/dist/domain-events/domain-events.d.ts.map +1 -1
- package/dist/domain-events/domain-events.js +5 -0
- package/dist/domain-events/domain-events.js.map +1 -1
- package/dist/media/file-origins.d.ts.map +1 -1
- package/dist/media/file-origins.js +3 -0
- package/dist/media/file-origins.js.map +1 -1
- package/dist/paths/collection-refs.d.ts +0 -1
- package/dist/paths/collection-refs.d.ts.map +1 -1
- package/dist/paths/collection-refs.js +0 -1
- package/dist/paths/collection-refs.js.map +1 -1
- package/dist/paths/collections.d.ts +0 -1
- package/dist/paths/collections.d.ts.map +1 -1
- package/dist/paths/collections.js +0 -1
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/path-builders.d.ts +0 -1
- package/dist/paths/path-builders.d.ts.map +1 -1
- package/dist/paths/path-builders.js +0 -4
- package/dist/paths/path-builders.js.map +1 -1
- package/dist/paths/storage-paths.d.ts +3 -4
- package/dist/paths/storage-paths.d.ts.map +1 -1
- package/dist/paths/storage-paths.js +10 -12
- package/dist/paths/storage-paths.js.map +1 -1
- package/dist/schemas/pictures.d.ts +9 -0
- package/dist/schemas/pictures.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/doc-schemas/signature-copy-intent.d.ts +0 -39
- package/dist/doc-schemas/signature-copy-intent.d.ts.map +0 -1
- package/dist/doc-schemas/signature-copy-intent.js +0 -53
- package/dist/doc-schemas/signature-copy-intent.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pictures.d.ts","sourceRoot":"","sources":["../../src/schemas/pictures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;kBAE3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,wCAAwC;;;kBAK1C,CAAC;AACZ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAC;AACF,eAAO,MAAM,yCAAyC
|
|
1
|
+
{"version":3,"file":"pictures.d.ts","sourceRoot":"","sources":["../../src/schemas/pictures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;kBAE3B,CAAC;AACZ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,wCAAwC;;;kBAK1C,CAAC;AACZ,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACtD,OAAO,wCAAwC,CAChD,CAAC;AACF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,OAAO,6CAA6C,CACrD,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;kBAKtC,CAAC;AACZ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAClG,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAEvC,CAAC;AACZ,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/q-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"description": "Core types, Firestore path constants, zod schemas, and shared constants for Q-Sports",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@ttt-productions/edge-protocol-core": "^0.1.15",
|
|
81
81
|
"@ttt-productions/input-format-core": "^0.1.4",
|
|
82
|
-
"@ttt-productions/media-schemas": "^0.14.
|
|
82
|
+
"@ttt-productions/media-schemas": "^0.14.17",
|
|
83
83
|
"@ttt-productions/notification-core": "^0.15.24",
|
|
84
|
-
"@ttt-productions/theme-core": "^0.12.
|
|
84
|
+
"@ttt-productions/theme-core": "^0.12.17",
|
|
85
85
|
"zod": "^4.4.3"
|
|
86
86
|
},
|
|
87
87
|
"author": "DJ (TTT Productions)",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const SignatureCopyIntentStateSchema: z.ZodEnum<{
|
|
3
|
-
copying: "copying";
|
|
4
|
-
reaping: "reaping";
|
|
5
|
-
}>;
|
|
6
|
-
export type SignatureCopyIntentState = z.infer<typeof SignatureCopyIntentStateSchema>;
|
|
7
|
-
export declare const SignatureCopyRecordRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
-
kind: z.ZodLiteral<"signedWaiver">;
|
|
9
|
-
leagueId: z.ZodString;
|
|
10
|
-
userId: z.ZodString;
|
|
11
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
-
kind: z.ZodLiteral<"hardwareLoanContract">;
|
|
13
|
-
contractId: z.ZodString;
|
|
14
|
-
}, z.core.$strip>], "kind">;
|
|
15
|
-
export type SignatureCopyRecordRef = z.infer<typeof SignatureCopyRecordRefSchema>;
|
|
16
|
-
export declare const SignatureCopyIntentSchema: z.ZodObject<{
|
|
17
|
-
stagingId: z.ZodString;
|
|
18
|
-
stagingPath: z.ZodString;
|
|
19
|
-
keptPath: z.ZodString;
|
|
20
|
-
record: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
-
kind: z.ZodLiteral<"signedWaiver">;
|
|
22
|
-
leagueId: z.ZodString;
|
|
23
|
-
userId: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
kind: z.ZodLiteral<"hardwareLoanContract">;
|
|
26
|
-
contractId: z.ZodString;
|
|
27
|
-
}, z.core.$strip>], "kind">;
|
|
28
|
-
state: z.ZodEnum<{
|
|
29
|
-
copying: "copying";
|
|
30
|
-
reaping: "reaping";
|
|
31
|
-
}>;
|
|
32
|
-
createdAt: z.ZodNumber;
|
|
33
|
-
updatedAt: z.ZodNumber;
|
|
34
|
-
reapAfter: z.ZodNumber;
|
|
35
|
-
reapAttemptCount: z.ZodNumber;
|
|
36
|
-
reapClaimedAt: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
export type SignatureCopyIntent = z.infer<typeof SignatureCopyIntentSchema>;
|
|
39
|
-
//# sourceMappingURL=signature-copy-intent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signature-copy-intent.d.ts","sourceRoot":"","sources":["../../src/doc-schemas/signature-copy-intent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,8BAA8B;;;EAAiC,CAAC;AAC7E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAGtF,eAAO,MAAM,4BAA4B;;;;;;;2BAGvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;iBA0ClC,CAAC;AACL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
// No native TTL: an intent removed before its kept copy is reaped strands that copy.
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { countSchema, epochMsSchema, hardwareLoanContractIdSchema, leagueIdSchema, stagingIdSchema, userIdSchema, } from './atoms.js';
|
|
4
|
-
export const SignatureCopyIntentStateSchema = z.enum(['copying', 'reaping']);
|
|
5
|
-
// The record whose `signatureFile` names the kept copy once the signing commits.
|
|
6
|
-
export const SignatureCopyRecordRefSchema = z.discriminatedUnion('kind', [
|
|
7
|
-
z.object({ kind: z.literal('signedWaiver'), leagueId: leagueIdSchema, userId: userIdSchema }),
|
|
8
|
-
z.object({ kind: z.literal('hardwareLoanContract'), contractId: hardwareLoanContractIdSchema }),
|
|
9
|
-
]);
|
|
10
|
-
export const SignatureCopyIntentSchema = z
|
|
11
|
-
.object({
|
|
12
|
-
stagingId: stagingIdSchema,
|
|
13
|
-
stagingPath: z.string().min(1),
|
|
14
|
-
keptPath: z.string().min(1),
|
|
15
|
-
record: SignatureCopyRecordRefSchema,
|
|
16
|
-
state: SignatureCopyIntentStateSchema,
|
|
17
|
-
createdAt: epochMsSchema,
|
|
18
|
-
updatedAt: epochMsSchema,
|
|
19
|
-
reapAfter: epochMsSchema,
|
|
20
|
-
reapAttemptCount: countSchema,
|
|
21
|
-
reapClaimedAt: epochMsSchema.optional(),
|
|
22
|
-
})
|
|
23
|
-
.superRefine((val, ctx) => {
|
|
24
|
-
if (!val.keptPath.endsWith(`/${val.stagingId}`)) {
|
|
25
|
-
ctx.addIssue({
|
|
26
|
-
code: 'custom',
|
|
27
|
-
path: ['keptPath'],
|
|
28
|
-
message: 'a kept copy is named for its own staging id',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
if (val.state === 'reaping' && val.reapClaimedAt === undefined) {
|
|
32
|
-
ctx.addIssue({
|
|
33
|
-
code: 'custom',
|
|
34
|
-
path: ['reapClaimedAt'],
|
|
35
|
-
message: 'a reaping intent records when it was claimed',
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (val.state === 'copying' && val.reapClaimedAt !== undefined) {
|
|
39
|
-
ctx.addIssue({
|
|
40
|
-
code: 'custom',
|
|
41
|
-
path: ['reapClaimedAt'],
|
|
42
|
-
message: 'a copying intent has not been claimed',
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (val.reapAfter < val.updatedAt) {
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
code: 'custom',
|
|
48
|
-
path: ['reapAfter'],
|
|
49
|
-
message: 'an intent is never due before the write last recorded it',
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=signature-copy-intent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signature-copy-intent.js","sourceRoot":"","sources":["../../src/doc-schemas/signature-copy-intent.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,aAAa,EACb,4BAA4B,EAC5B,cAAc,EACd,eAAe,EACf,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAG7E,iFAAiF;AACjF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACvE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;IAC7F,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,UAAU,EAAE,4BAA4B,EAAE,CAAC;CAChG,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC;KACvC,MAAM,CAAC;IACN,SAAS,EAAE,eAAe;IAC1B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE,8BAA8B;IACrC,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,WAAW;IAC7B,aAAa,EAAE,aAAa,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,WAAW,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACxB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,UAAU,CAAC;YAClB,OAAO,EAAE,6CAA6C;SACvD,CAAC,CAAC;IACL,CAAC;IACD,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QAC/D,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,eAAe,CAAC;YACvB,OAAO,EAAE,8CAA8C;SACxD,CAAC,CAAC;IACL,CAAC;IACD,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QAC/D,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,eAAe,CAAC;YACvB,OAAO,EAAE,uCAAuC;SACjD,CAAC,CAAC;IACL,CAAC;IACD,IAAI,GAAG,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;QAClC,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,WAAW,CAAC;YACnB,OAAO,EAAE,0DAA0D;SACpE,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["// No native TTL: an intent removed before its kept copy is reaped strands that copy.\n\nimport { z } from 'zod';\nimport {\n countSchema,\n epochMsSchema,\n hardwareLoanContractIdSchema,\n leagueIdSchema,\n stagingIdSchema,\n userIdSchema,\n} from './atoms.js';\n\nexport const SignatureCopyIntentStateSchema = z.enum(['copying', 'reaping']);\nexport type SignatureCopyIntentState = z.infer<typeof SignatureCopyIntentStateSchema>;\n\n// The record whose `signatureFile` names the kept copy once the signing commits.\nexport const SignatureCopyRecordRefSchema = z.discriminatedUnion('kind', [\n z.object({ kind: z.literal('signedWaiver'), leagueId: leagueIdSchema, userId: userIdSchema }),\n z.object({ kind: z.literal('hardwareLoanContract'), contractId: hardwareLoanContractIdSchema }),\n]);\nexport type SignatureCopyRecordRef = z.infer<typeof SignatureCopyRecordRefSchema>;\n\nexport const SignatureCopyIntentSchema = z\n .object({\n stagingId: stagingIdSchema,\n stagingPath: z.string().min(1),\n keptPath: z.string().min(1),\n record: SignatureCopyRecordRefSchema,\n state: SignatureCopyIntentStateSchema,\n createdAt: epochMsSchema,\n updatedAt: epochMsSchema,\n reapAfter: epochMsSchema,\n reapAttemptCount: countSchema,\n reapClaimedAt: epochMsSchema.optional(),\n })\n .superRefine((val, ctx) => {\n if (!val.keptPath.endsWith(`/${val.stagingId}`)) {\n ctx.addIssue({\n code: 'custom',\n path: ['keptPath'],\n message: 'a kept copy is named for its own staging id',\n });\n }\n if (val.state === 'reaping' && val.reapClaimedAt === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['reapClaimedAt'],\n message: 'a reaping intent records when it was claimed',\n });\n }\n if (val.state === 'copying' && val.reapClaimedAt !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['reapClaimedAt'],\n message: 'a copying intent has not been claimed',\n });\n }\n if (val.reapAfter < val.updatedAt) {\n ctx.addIssue({\n code: 'custom',\n path: ['reapAfter'],\n message: 'an intent is never due before the write last recorded it',\n });\n }\n });\nexport type SignatureCopyIntent = z.infer<typeof SignatureCopyIntentSchema>;\n"]}
|