@blitzreels/contracts 0.1.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 +5 -0
- package/dist/error-contract.d.ts +34 -0
- package/dist/error-contract.d.ts.map +1 -0
- package/dist/error-contract.js +133 -0
- package/dist/error-contract.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/sequence-operation-registry.d.ts +74 -0
- package/dist/sequence-operation-registry.d.ts.map +1 -0
- package/dist/sequence-operation-registry.js +287 -0
- package/dist/sequence-operation-registry.js.map +1 -0
- package/dist/sequence-timing-contract.d.ts +70 -0
- package/dist/sequence-timing-contract.d.ts.map +1 -0
- package/dist/sequence-timing-contract.js +2 -0
- package/dist/sequence-timing-contract.js.map +1 -0
- package/dist/timeline-batch-contract.d.ts +58 -0
- package/dist/timeline-batch-contract.d.ts.map +1 -0
- package/dist/timeline-batch-contract.js +2 -0
- package/dist/timeline-batch-contract.js.map +1 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type PublicErrorCode = "api_error" | "auth_error" | "upgrade_required" | "not_found" | "conflict" | "validation_error" | "partial_failure" | "rate_limited" | "timeout" | "server_error";
|
|
2
|
+
export declare const SEQUENCE_OPERATION_ERROR_CODES: readonly ["validation_error", "not_found", "permission_denied", "revision_conflict", "idempotency_conflict", "operation_in_progress", "operation_previous_failure", "sequence_busy", "mutation_failed"];
|
|
3
|
+
export type SequenceOperationErrorCode = (typeof SEQUENCE_OPERATION_ERROR_CODES)[number];
|
|
4
|
+
export type BlitzReelsErrorCode = PublicErrorCode | SequenceOperationErrorCode;
|
|
5
|
+
export type BlitzReelsCliExitCode = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
6
|
+
export type BlitzReelsErrorDetails = Record<string, string | number | boolean | null>;
|
|
7
|
+
export type SequenceOperationItemFailure = {
|
|
8
|
+
timeline_item_id: string;
|
|
9
|
+
error: string;
|
|
10
|
+
error_code: SequenceOperationErrorCode;
|
|
11
|
+
retryable: boolean;
|
|
12
|
+
error_details: BlitzReelsErrorDetails;
|
|
13
|
+
};
|
|
14
|
+
export type SequenceOperationErrorDefinition = {
|
|
15
|
+
code: SequenceOperationErrorCode;
|
|
16
|
+
publicCode: PublicErrorCode;
|
|
17
|
+
httpStatus: 400 | 403 | 404 | 409 | 500;
|
|
18
|
+
nonRetryableCliExitCode: BlitzReelsCliExitCode;
|
|
19
|
+
retryableCliExitCode: BlitzReelsCliExitCode;
|
|
20
|
+
};
|
|
21
|
+
export declare const SEQUENCE_OPERATION_ERROR_DEFINITIONS: readonly [SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition, SequenceOperationErrorDefinition];
|
|
22
|
+
export declare function isSequenceOperationErrorCode(value: string): value is SequenceOperationErrorCode;
|
|
23
|
+
export declare function getSequenceOperationErrorDefinition({ code, }: {
|
|
24
|
+
code: SequenceOperationErrorCode;
|
|
25
|
+
}): (typeof SEQUENCE_OPERATION_ERROR_DEFINITIONS)[number];
|
|
26
|
+
export declare function isBlitzReelsErrorCode(value: string): value is BlitzReelsErrorCode;
|
|
27
|
+
export declare function getBlitzReelsErrorCliExitCode({ code, retryable, }: {
|
|
28
|
+
code: BlitzReelsErrorCode;
|
|
29
|
+
retryable: boolean;
|
|
30
|
+
}): BlitzReelsCliExitCode;
|
|
31
|
+
export declare function getBlitzReelsErrorDefaultRetryable({ code, }: {
|
|
32
|
+
code: PublicErrorCode;
|
|
33
|
+
}): boolean;
|
|
34
|
+
//# sourceMappingURL=error-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-contract.d.ts","sourceRoot":"","sources":["../src/error-contract.ts"],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A0B,CAAC;CAClC,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC,MAAM,CAAC,CAMxD;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GACZ,KAAK,IAAI,mBAAmB,CAc9B;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,qBAAqB,CAsBxB;AAED,wBAAgB,kCAAkC,CAAC,EACjD,IAAI,GACL,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;CACvB,GAAG,OAAO,CAIV"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
export const SEQUENCE_OPERATION_ERROR_CODES = [
|
|
2
|
+
"validation_error",
|
|
3
|
+
"not_found",
|
|
4
|
+
"permission_denied",
|
|
5
|
+
"revision_conflict",
|
|
6
|
+
"idempotency_conflict",
|
|
7
|
+
"operation_in_progress",
|
|
8
|
+
"operation_previous_failure",
|
|
9
|
+
"sequence_busy",
|
|
10
|
+
"mutation_failed",
|
|
11
|
+
];
|
|
12
|
+
function defineSequenceOperationError(definition) {
|
|
13
|
+
return definition;
|
|
14
|
+
}
|
|
15
|
+
export const SEQUENCE_OPERATION_ERROR_DEFINITIONS = [
|
|
16
|
+
defineSequenceOperationError({
|
|
17
|
+
code: "validation_error",
|
|
18
|
+
publicCode: "validation_error",
|
|
19
|
+
httpStatus: 400,
|
|
20
|
+
nonRetryableCliExitCode: 2,
|
|
21
|
+
retryableCliExitCode: 2,
|
|
22
|
+
}),
|
|
23
|
+
defineSequenceOperationError({
|
|
24
|
+
code: "not_found",
|
|
25
|
+
publicCode: "not_found",
|
|
26
|
+
httpStatus: 404,
|
|
27
|
+
nonRetryableCliExitCode: 4,
|
|
28
|
+
retryableCliExitCode: 4,
|
|
29
|
+
}),
|
|
30
|
+
defineSequenceOperationError({
|
|
31
|
+
code: "permission_denied",
|
|
32
|
+
publicCode: "auth_error",
|
|
33
|
+
httpStatus: 403,
|
|
34
|
+
nonRetryableCliExitCode: 3,
|
|
35
|
+
retryableCliExitCode: 3,
|
|
36
|
+
}),
|
|
37
|
+
defineSequenceOperationError({
|
|
38
|
+
code: "revision_conflict",
|
|
39
|
+
publicCode: "conflict",
|
|
40
|
+
httpStatus: 409,
|
|
41
|
+
nonRetryableCliExitCode: 5,
|
|
42
|
+
retryableCliExitCode: 5,
|
|
43
|
+
}),
|
|
44
|
+
defineSequenceOperationError({
|
|
45
|
+
code: "idempotency_conflict",
|
|
46
|
+
publicCode: "conflict",
|
|
47
|
+
httpStatus: 409,
|
|
48
|
+
nonRetryableCliExitCode: 5,
|
|
49
|
+
retryableCliExitCode: 5,
|
|
50
|
+
}),
|
|
51
|
+
defineSequenceOperationError({
|
|
52
|
+
code: "operation_in_progress",
|
|
53
|
+
publicCode: "conflict",
|
|
54
|
+
httpStatus: 409,
|
|
55
|
+
nonRetryableCliExitCode: 5,
|
|
56
|
+
retryableCliExitCode: 5,
|
|
57
|
+
}),
|
|
58
|
+
defineSequenceOperationError({
|
|
59
|
+
code: "operation_previous_failure",
|
|
60
|
+
publicCode: "conflict",
|
|
61
|
+
httpStatus: 409,
|
|
62
|
+
nonRetryableCliExitCode: 5,
|
|
63
|
+
retryableCliExitCode: 5,
|
|
64
|
+
}),
|
|
65
|
+
defineSequenceOperationError({
|
|
66
|
+
code: "sequence_busy",
|
|
67
|
+
publicCode: "conflict",
|
|
68
|
+
httpStatus: 409,
|
|
69
|
+
nonRetryableCliExitCode: 5,
|
|
70
|
+
retryableCliExitCode: 5,
|
|
71
|
+
}),
|
|
72
|
+
defineSequenceOperationError({
|
|
73
|
+
code: "mutation_failed",
|
|
74
|
+
publicCode: "server_error",
|
|
75
|
+
httpStatus: 500,
|
|
76
|
+
nonRetryableCliExitCode: 1,
|
|
77
|
+
retryableCliExitCode: 7,
|
|
78
|
+
}),
|
|
79
|
+
];
|
|
80
|
+
const sequenceOperationErrorDefinitionsByCode = new Map(SEQUENCE_OPERATION_ERROR_DEFINITIONS.map((definition) => [
|
|
81
|
+
definition.code,
|
|
82
|
+
definition,
|
|
83
|
+
]));
|
|
84
|
+
export function isSequenceOperationErrorCode(value) {
|
|
85
|
+
return sequenceOperationErrorDefinitionsByCode.has(value);
|
|
86
|
+
}
|
|
87
|
+
export function getSequenceOperationErrorDefinition({ code, }) {
|
|
88
|
+
const definition = sequenceOperationErrorDefinitionsByCode.get(code);
|
|
89
|
+
if (!definition) {
|
|
90
|
+
throw new Error(`Unknown sequence operation error: ${code}`);
|
|
91
|
+
}
|
|
92
|
+
return definition;
|
|
93
|
+
}
|
|
94
|
+
export function isBlitzReelsErrorCode(value) {
|
|
95
|
+
return (value === "api_error" ||
|
|
96
|
+
value === "auth_error" ||
|
|
97
|
+
value === "upgrade_required" ||
|
|
98
|
+
value === "not_found" ||
|
|
99
|
+
value === "conflict" ||
|
|
100
|
+
value === "validation_error" ||
|
|
101
|
+
value === "partial_failure" ||
|
|
102
|
+
value === "rate_limited" ||
|
|
103
|
+
value === "timeout" ||
|
|
104
|
+
value === "server_error" ||
|
|
105
|
+
isSequenceOperationErrorCode(value));
|
|
106
|
+
}
|
|
107
|
+
export function getBlitzReelsErrorCliExitCode({ code, retryable, }) {
|
|
108
|
+
if (isSequenceOperationErrorCode(code)) {
|
|
109
|
+
const definition = getSequenceOperationErrorDefinition({ code });
|
|
110
|
+
return retryable
|
|
111
|
+
? definition.retryableCliExitCode
|
|
112
|
+
: definition.nonRetryableCliExitCode;
|
|
113
|
+
}
|
|
114
|
+
switch (code) {
|
|
115
|
+
case "auth_error":
|
|
116
|
+
case "upgrade_required":
|
|
117
|
+
return 3;
|
|
118
|
+
case "conflict":
|
|
119
|
+
case "partial_failure":
|
|
120
|
+
return 5;
|
|
121
|
+
case "rate_limited":
|
|
122
|
+
return 6;
|
|
123
|
+
case "timeout":
|
|
124
|
+
case "server_error":
|
|
125
|
+
return 7;
|
|
126
|
+
case "api_error":
|
|
127
|
+
return 1;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export function getBlitzReelsErrorDefaultRetryable({ code, }) {
|
|
131
|
+
return (code === "rate_limited" || code === "timeout" || code === "server_error");
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=error-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-contract.js","sourceRoot":"","sources":["../src/error-contract.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,kBAAkB;IAClB,WAAW;IACX,mBAAmB;IACnB,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,4BAA4B;IAC5B,eAAe;IACf,iBAAiB;CACT,CAAC;AA8BX,SAAS,4BAA4B,CACnC,UAA4C;IAE5C,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,4BAA4B,CAAC;QAC3B,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,kBAAkB;QAC9B,UAAU,EAAE,GAAG;QACf,uBAAuB,EAAE,CAAC;QAC1B,oBAAoB,EAAE,CAAC;KACxB,CAAC;IACF,4BAA4B,CAAC;QAC3B,IAAI,EAAE,WAAW;QACjB,UAAU,EAAE,WAAW;QACvB,UAAU,EAAE,GAAG;QACf,uBAAuB,EAAE,CAAC;QAC1B,oBAAoB,EAAE,CAAC;KACxB,CAAC;IACF,4BAA4B,CAAC;QAC3B,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,GAAG;QACf,uBAAuB,EAAE,CAAC;QAC1B,oBAAoB,EAAE,CAAC;KACxB,CAAC;IACF,4BAA4B,CAAC;QAC3B,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,GAAG;QACf,uBAAuB,EAAE,CAAC;QAC1B,oBAAoB,EAAE,CAAC;KACxB,CAAC;IACF,4BAA4B,CAA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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { BlitzReelsCliExitCode, BlitzReelsErrorCode, BlitzReelsErrorDetails, PublicErrorCode, SequenceOperationErrorCode, SequenceOperationErrorDefinition, SequenceOperationItemFailure, } from "./error-contract.js";
|
|
2
|
+
export { getBlitzReelsErrorCliExitCode, getBlitzReelsErrorDefaultRetryable, getSequenceOperationErrorDefinition, isBlitzReelsErrorCode, isSequenceOperationErrorCode, SEQUENCE_OPERATION_ERROR_CODES, SEQUENCE_OPERATION_ERROR_DEFINITIONS, } from "./error-contract.js";
|
|
3
|
+
export type { SequenceOperationDefinition, SequenceOperationExposure, SequenceOperationFamily, SequenceOperationId, SequenceOperationPreviewSupport, SequenceOperationPreviewSurface, SequenceOperationProjection, SequenceOperationProjections, SequenceOperationSurface, } from "./sequence-operation-registry.js";
|
|
4
|
+
export { getSequenceOperationDefinition, isSequenceOperationId, SEQUENCE_OPERATION_DEFINITIONS, SEQUENCE_OPERATION_IDS, } from "./sequence-operation-registry.js";
|
|
5
|
+
export type { SequenceTimingExecuteOptions, SequenceTimingExecuteResult, SequenceTimingOperation, SequenceTimingPreviewOptions, SequenceTimingPreviewResult, } from "./sequence-timing-contract.js";
|
|
6
|
+
export type { TimelineBatchDeleteResult, TimelineBatchMoveResult, TimelineBatchTransformResult, TimelineBatchTrimResult, } from "./timeline-batch-contract.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,0BAA0B,EAC1B,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,mCAAmC,EACnC,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,mBAAmB,EACnB,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { getBlitzReelsErrorCliExitCode, getBlitzReelsErrorDefaultRetryable, getSequenceOperationErrorDefinition, isBlitzReelsErrorCode, isSequenceOperationErrorCode, SEQUENCE_OPERATION_ERROR_CODES, SEQUENCE_OPERATION_ERROR_DEFINITIONS, } from "./error-contract.js";
|
|
2
|
+
export { getSequenceOperationDefinition, isSequenceOperationId, SEQUENCE_OPERATION_DEFINITIONS, SEQUENCE_OPERATION_IDS, } from "./sequence-operation-registry.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,mCAAmC,EACnC,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,oCAAoC,GACrC,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,8BAA8B,EAC9B,sBAAsB,GACvB,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type SequenceOperationExposure = "internal" | "public";
|
|
2
|
+
export type SequenceOperationFamily = "item" | "batch" | "audio" | "effect" | "overlay" | "keyframe" | "crop" | "nle" | "structure" | "recut" | "caption";
|
|
3
|
+
export type SequenceOperationSurface = "trpc" | "publicApi" | "mcp" | "sdk" | "cli" | "openapi" | "docs";
|
|
4
|
+
export type SequenceOperationProjection = "direct" | "compatibility" | "none";
|
|
5
|
+
export type SequenceOperationProjections = Record<SequenceOperationSurface, SequenceOperationProjection>;
|
|
6
|
+
export type SequenceOperationPreviewSurface = "kernel" | SequenceOperationSurface;
|
|
7
|
+
export type SequenceOperationPreviewSupport = Record<SequenceOperationPreviewSurface, boolean>;
|
|
8
|
+
export type SequenceOperationDefinition = {
|
|
9
|
+
operationId: string;
|
|
10
|
+
family: SequenceOperationFamily;
|
|
11
|
+
summary: string;
|
|
12
|
+
destructive: boolean;
|
|
13
|
+
exposure: SequenceOperationExposure;
|
|
14
|
+
previewSupported: SequenceOperationPreviewSupport;
|
|
15
|
+
projections: SequenceOperationProjections;
|
|
16
|
+
};
|
|
17
|
+
export declare const SEQUENCE_OPERATION_DEFINITIONS: readonly [SequenceOperationDefinition & {
|
|
18
|
+
operationId: "timeline.item.add";
|
|
19
|
+
}, SequenceOperationDefinition & {
|
|
20
|
+
operationId: "timeline.item.generic.add";
|
|
21
|
+
}, SequenceOperationDefinition & {
|
|
22
|
+
operationId: "timeline.item.commit";
|
|
23
|
+
}, SequenceOperationDefinition & {
|
|
24
|
+
operationId: "timeline.item.trim";
|
|
25
|
+
}, SequenceOperationDefinition & {
|
|
26
|
+
operationId: "timeline.item.split";
|
|
27
|
+
}, SequenceOperationDefinition & {
|
|
28
|
+
operationId: "timeline.item.remove";
|
|
29
|
+
}, SequenceOperationDefinition & {
|
|
30
|
+
operationId: "timeline.item.transform";
|
|
31
|
+
}, SequenceOperationDefinition & {
|
|
32
|
+
operationId: "timeline.items.commit";
|
|
33
|
+
}, SequenceOperationDefinition & {
|
|
34
|
+
operationId: "timeline.items.remove";
|
|
35
|
+
}, SequenceOperationDefinition & {
|
|
36
|
+
operationId: "timeline.item.split.batch";
|
|
37
|
+
}, SequenceOperationDefinition & {
|
|
38
|
+
operationId: "timeline.items.duplicate";
|
|
39
|
+
}, SequenceOperationDefinition & {
|
|
40
|
+
operationId: "timeline.item.replace";
|
|
41
|
+
}, SequenceOperationDefinition & {
|
|
42
|
+
operationId: "timeline.item.audio.update";
|
|
43
|
+
}, SequenceOperationDefinition & {
|
|
44
|
+
operationId: "timeline.items.order";
|
|
45
|
+
}, SequenceOperationDefinition & {
|
|
46
|
+
operationId: "timeline.pack";
|
|
47
|
+
}, SequenceOperationDefinition & {
|
|
48
|
+
operationId: "timeline.effect.add";
|
|
49
|
+
}, SequenceOperationDefinition & {
|
|
50
|
+
operationId: "timeline.effect.update";
|
|
51
|
+
}, SequenceOperationDefinition & {
|
|
52
|
+
operationId: "timeline.overlay.add";
|
|
53
|
+
}, SequenceOperationDefinition & {
|
|
54
|
+
operationId: "timeline.overlay.update";
|
|
55
|
+
}, SequenceOperationDefinition & {
|
|
56
|
+
operationId: "timeline.overlay.remove";
|
|
57
|
+
}, SequenceOperationDefinition & {
|
|
58
|
+
operationId: "timeline.keyframes.commit";
|
|
59
|
+
}, SequenceOperationDefinition & {
|
|
60
|
+
operationId: "timeline.crop.commit";
|
|
61
|
+
}, SequenceOperationDefinition & {
|
|
62
|
+
operationId: "timeline.items.nle-edit";
|
|
63
|
+
}, SequenceOperationDefinition & {
|
|
64
|
+
operationId: "timeline.structure.edit";
|
|
65
|
+
}, SequenceOperationDefinition & {
|
|
66
|
+
operationId: "timeline.recut.apply";
|
|
67
|
+
}, SequenceOperationDefinition & {
|
|
68
|
+
operationId: "timeline.captions.commit";
|
|
69
|
+
}];
|
|
70
|
+
export type SequenceOperationId = (typeof SEQUENCE_OPERATION_DEFINITIONS)[number]["operationId"];
|
|
71
|
+
export declare const SEQUENCE_OPERATION_IDS: readonly SequenceOperationId[];
|
|
72
|
+
export declare function isSequenceOperationId(value: string): value is SequenceOperationId;
|
|
73
|
+
export declare function getSequenceOperationDefinition(operationId: SequenceOperationId): (typeof SEQUENCE_OPERATION_DEFINITIONS)[number];
|
|
74
|
+
//# sourceMappingURL=sequence-operation-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-operation-registry.d.ts","sourceRoot":"","sources":["../src/sequence-operation-registry.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE9D,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,UAAU,GACV,MAAM,GACN,KAAK,GACL,WAAW,GACX,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN,WAAW,GACX,KAAK,GACL,KAAK,GACL,KAAK,GACL,SAAS,GACT,MAAM,CAAC;AAEX,MAAM,MAAM,2BAA2B,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,CAAC;AAE9E,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAC/C,wBAAwB,EACxB,2BAA2B,CAC5B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GACvC,QAAQ,GACR,wBAAwB,CAAC;AAE7B,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAClD,+BAA+B,EAC/B,OAAO,CACR,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,uBAAuB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,yBAAyB,CAAC;IACpC,gBAAgB,EAAE,+BAA+B,CAAC;IAClD,WAAW,EAAE,4BAA4B,CAAC;CAC3C,CAAC;AAmFF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiNjC,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;AAEjE,eAAO,MAAM,sBAAsB,EAE9B,SAAS,mBAAmB,EAAE,CAAC;AASpC,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GACZ,KAAK,IAAI,mBAAmB,CAE9B;AAED,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,mBAAmB,GAC/B,CAAC,OAAO,8BAA8B,CAAC,CAAC,MAAM,CAAC,CAMjD"}
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
const TRPC_ONLY_PROJECTIONS = {
|
|
2
|
+
trpc: "direct",
|
|
3
|
+
publicApi: "none",
|
|
4
|
+
mcp: "none",
|
|
5
|
+
sdk: "none",
|
|
6
|
+
cli: "none",
|
|
7
|
+
openapi: "none",
|
|
8
|
+
docs: "none",
|
|
9
|
+
};
|
|
10
|
+
const PUBLIC_COMPATIBILITY_PROJECTIONS = {
|
|
11
|
+
trpc: "direct",
|
|
12
|
+
publicApi: "compatibility",
|
|
13
|
+
mcp: "none",
|
|
14
|
+
sdk: "compatibility",
|
|
15
|
+
cli: "compatibility",
|
|
16
|
+
openapi: "compatibility",
|
|
17
|
+
docs: "compatibility",
|
|
18
|
+
};
|
|
19
|
+
const PUBLIC_TIMING_DIRECT_PROJECTIONS = {
|
|
20
|
+
trpc: "direct",
|
|
21
|
+
publicApi: "direct",
|
|
22
|
+
mcp: "direct",
|
|
23
|
+
sdk: "direct",
|
|
24
|
+
cli: "direct",
|
|
25
|
+
openapi: "direct",
|
|
26
|
+
docs: "direct",
|
|
27
|
+
};
|
|
28
|
+
const PUBLIC_TIMING_PREVIEW_SUPPORT = {
|
|
29
|
+
kernel: true,
|
|
30
|
+
trpc: true,
|
|
31
|
+
publicApi: true,
|
|
32
|
+
mcp: true,
|
|
33
|
+
sdk: true,
|
|
34
|
+
cli: false,
|
|
35
|
+
openapi: true,
|
|
36
|
+
docs: true,
|
|
37
|
+
};
|
|
38
|
+
function defineSequenceOperation({ operationId, family, summary, destructive, exposure, projections, }) {
|
|
39
|
+
const hasDirectTimingPreview = operationId === "timeline.item.trim" ||
|
|
40
|
+
operationId === "timeline.item.split";
|
|
41
|
+
return {
|
|
42
|
+
operationId,
|
|
43
|
+
family,
|
|
44
|
+
summary,
|
|
45
|
+
destructive,
|
|
46
|
+
exposure,
|
|
47
|
+
previewSupported: hasDirectTimingPreview
|
|
48
|
+
? PUBLIC_TIMING_PREVIEW_SUPPORT
|
|
49
|
+
: {
|
|
50
|
+
kernel: true,
|
|
51
|
+
trpc: true,
|
|
52
|
+
publicApi: false,
|
|
53
|
+
mcp: false,
|
|
54
|
+
sdk: false,
|
|
55
|
+
cli: false,
|
|
56
|
+
openapi: false,
|
|
57
|
+
docs: false,
|
|
58
|
+
},
|
|
59
|
+
projections,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export const SEQUENCE_OPERATION_DEFINITIONS = [
|
|
63
|
+
defineSequenceOperation({
|
|
64
|
+
operationId: "timeline.item.add",
|
|
65
|
+
family: "item",
|
|
66
|
+
summary: "Add a media item to a project timeline.",
|
|
67
|
+
destructive: false,
|
|
68
|
+
exposure: "public",
|
|
69
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
70
|
+
}),
|
|
71
|
+
defineSequenceOperation({
|
|
72
|
+
operationId: "timeline.item.generic.add",
|
|
73
|
+
family: "item",
|
|
74
|
+
summary: "Add a typed media, content, or group timeline item.",
|
|
75
|
+
destructive: false,
|
|
76
|
+
exposure: "internal",
|
|
77
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
78
|
+
}),
|
|
79
|
+
defineSequenceOperation({
|
|
80
|
+
operationId: "timeline.item.commit",
|
|
81
|
+
family: "item",
|
|
82
|
+
summary: "Commit one timeline item timing or layer change.",
|
|
83
|
+
destructive: false,
|
|
84
|
+
exposure: "public",
|
|
85
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
86
|
+
}),
|
|
87
|
+
defineSequenceOperation({
|
|
88
|
+
operationId: "timeline.item.trim",
|
|
89
|
+
family: "item",
|
|
90
|
+
summary: "Trim or extend one timeline item.",
|
|
91
|
+
destructive: false,
|
|
92
|
+
exposure: "public",
|
|
93
|
+
projections: PUBLIC_TIMING_DIRECT_PROJECTIONS,
|
|
94
|
+
}),
|
|
95
|
+
defineSequenceOperation({
|
|
96
|
+
operationId: "timeline.item.split",
|
|
97
|
+
family: "item",
|
|
98
|
+
summary: "Split one timeline item at an exact sequence position.",
|
|
99
|
+
destructive: false,
|
|
100
|
+
exposure: "public",
|
|
101
|
+
projections: PUBLIC_TIMING_DIRECT_PROJECTIONS,
|
|
102
|
+
}),
|
|
103
|
+
defineSequenceOperation({
|
|
104
|
+
operationId: "timeline.item.remove",
|
|
105
|
+
family: "item",
|
|
106
|
+
summary: "Remove one timeline item and its requested linked captions.",
|
|
107
|
+
destructive: true,
|
|
108
|
+
exposure: "public",
|
|
109
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
110
|
+
}),
|
|
111
|
+
defineSequenceOperation({
|
|
112
|
+
operationId: "timeline.item.transform",
|
|
113
|
+
family: "item",
|
|
114
|
+
summary: "Change one timeline item's visual transform.",
|
|
115
|
+
destructive: false,
|
|
116
|
+
exposure: "public",
|
|
117
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
118
|
+
}),
|
|
119
|
+
defineSequenceOperation({
|
|
120
|
+
operationId: "timeline.items.commit",
|
|
121
|
+
family: "batch",
|
|
122
|
+
summary: "Commit timing, trim, layer, or state changes for timeline items.",
|
|
123
|
+
destructive: false,
|
|
124
|
+
exposure: "public",
|
|
125
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
126
|
+
}),
|
|
127
|
+
defineSequenceOperation({
|
|
128
|
+
operationId: "timeline.items.remove",
|
|
129
|
+
family: "batch",
|
|
130
|
+
summary: "Remove multiple timeline items in one sequence transaction.",
|
|
131
|
+
destructive: true,
|
|
132
|
+
exposure: "public",
|
|
133
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
134
|
+
}),
|
|
135
|
+
defineSequenceOperation({
|
|
136
|
+
operationId: "timeline.item.split.batch",
|
|
137
|
+
family: "batch",
|
|
138
|
+
summary: "Split one timeline item at multiple sequence positions.",
|
|
139
|
+
destructive: false,
|
|
140
|
+
exposure: "internal",
|
|
141
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
142
|
+
}),
|
|
143
|
+
defineSequenceOperation({
|
|
144
|
+
operationId: "timeline.items.duplicate",
|
|
145
|
+
family: "batch",
|
|
146
|
+
summary: "Duplicate timeline items at explicit positions and layers.",
|
|
147
|
+
destructive: false,
|
|
148
|
+
exposure: "internal",
|
|
149
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
150
|
+
}),
|
|
151
|
+
defineSequenceOperation({
|
|
152
|
+
operationId: "timeline.item.replace",
|
|
153
|
+
family: "item",
|
|
154
|
+
summary: "Replace the media asset used by one timeline item.",
|
|
155
|
+
destructive: false,
|
|
156
|
+
exposure: "internal",
|
|
157
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
158
|
+
}),
|
|
159
|
+
defineSequenceOperation({
|
|
160
|
+
operationId: "timeline.item.audio.update",
|
|
161
|
+
family: "audio",
|
|
162
|
+
summary: "Update one timeline item's duration, volume, and fades.",
|
|
163
|
+
destructive: false,
|
|
164
|
+
exposure: "public",
|
|
165
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
166
|
+
}),
|
|
167
|
+
defineSequenceOperation({
|
|
168
|
+
operationId: "timeline.items.order",
|
|
169
|
+
family: "batch",
|
|
170
|
+
summary: "Set the stable order of timeline items.",
|
|
171
|
+
destructive: false,
|
|
172
|
+
exposure: "internal",
|
|
173
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
174
|
+
}),
|
|
175
|
+
defineSequenceOperation({
|
|
176
|
+
operationId: "timeline.pack",
|
|
177
|
+
family: "batch",
|
|
178
|
+
summary: "Pack timeline clips in time or consolidate track layers.",
|
|
179
|
+
destructive: false,
|
|
180
|
+
exposure: "public",
|
|
181
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
182
|
+
}),
|
|
183
|
+
defineSequenceOperation({
|
|
184
|
+
operationId: "timeline.effect.add",
|
|
185
|
+
family: "effect",
|
|
186
|
+
summary: "Add a typed visual effect to the timeline.",
|
|
187
|
+
destructive: false,
|
|
188
|
+
exposure: "public",
|
|
189
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
190
|
+
}),
|
|
191
|
+
defineSequenceOperation({
|
|
192
|
+
operationId: "timeline.effect.update",
|
|
193
|
+
family: "effect",
|
|
194
|
+
summary: "Update settings for a typed visual effect.",
|
|
195
|
+
destructive: false,
|
|
196
|
+
exposure: "public",
|
|
197
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
198
|
+
}),
|
|
199
|
+
defineSequenceOperation({
|
|
200
|
+
operationId: "timeline.overlay.add",
|
|
201
|
+
family: "overlay",
|
|
202
|
+
summary: "Add an editable overlay composition to the timeline.",
|
|
203
|
+
destructive: false,
|
|
204
|
+
exposure: "public",
|
|
205
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
206
|
+
}),
|
|
207
|
+
defineSequenceOperation({
|
|
208
|
+
operationId: "timeline.overlay.update",
|
|
209
|
+
family: "overlay",
|
|
210
|
+
summary: "Update an editable overlay composition.",
|
|
211
|
+
destructive: false,
|
|
212
|
+
exposure: "public",
|
|
213
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
214
|
+
}),
|
|
215
|
+
defineSequenceOperation({
|
|
216
|
+
operationId: "timeline.overlay.remove",
|
|
217
|
+
family: "overlay",
|
|
218
|
+
summary: "Remove an editable overlay composition.",
|
|
219
|
+
destructive: true,
|
|
220
|
+
exposure: "public",
|
|
221
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
222
|
+
}),
|
|
223
|
+
defineSequenceOperation({
|
|
224
|
+
operationId: "timeline.keyframes.commit",
|
|
225
|
+
family: "keyframe",
|
|
226
|
+
summary: "Create, update, or remove timeline item keyframes atomically.",
|
|
227
|
+
destructive: false,
|
|
228
|
+
exposure: "internal",
|
|
229
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
230
|
+
}),
|
|
231
|
+
defineSequenceOperation({
|
|
232
|
+
operationId: "timeline.crop.commit",
|
|
233
|
+
family: "crop",
|
|
234
|
+
summary: "Commit one media view crop and reconcile crop keyframes.",
|
|
235
|
+
destructive: false,
|
|
236
|
+
exposure: "internal",
|
|
237
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
238
|
+
}),
|
|
239
|
+
defineSequenceOperation({
|
|
240
|
+
operationId: "timeline.items.nle-edit",
|
|
241
|
+
family: "nle",
|
|
242
|
+
summary: "Apply a ripple, roll, slip, slide, or snap edit.",
|
|
243
|
+
destructive: false,
|
|
244
|
+
exposure: "internal",
|
|
245
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
246
|
+
}),
|
|
247
|
+
defineSequenceOperation({
|
|
248
|
+
operationId: "timeline.structure.edit",
|
|
249
|
+
family: "structure",
|
|
250
|
+
summary: "Group, ungroup, or reorder projected timeline tracks.",
|
|
251
|
+
destructive: true,
|
|
252
|
+
exposure: "internal",
|
|
253
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
254
|
+
}),
|
|
255
|
+
defineSequenceOperation({
|
|
256
|
+
operationId: "timeline.recut.apply",
|
|
257
|
+
family: "recut",
|
|
258
|
+
summary: "Apply a caption, audio, or explicit cut-plan recut.",
|
|
259
|
+
destructive: true,
|
|
260
|
+
exposure: "public",
|
|
261
|
+
projections: PUBLIC_COMPATIBILITY_PROJECTIONS,
|
|
262
|
+
}),
|
|
263
|
+
defineSequenceOperation({
|
|
264
|
+
operationId: "timeline.captions.commit",
|
|
265
|
+
family: "caption",
|
|
266
|
+
summary: "Add or synchronize project caption timeline items.",
|
|
267
|
+
destructive: false,
|
|
268
|
+
exposure: "internal",
|
|
269
|
+
projections: TRPC_ONLY_PROJECTIONS,
|
|
270
|
+
}),
|
|
271
|
+
];
|
|
272
|
+
export const SEQUENCE_OPERATION_IDS = SEQUENCE_OPERATION_DEFINITIONS.map((definition) => definition.operationId);
|
|
273
|
+
const sequenceOperationDefinitionsById = new Map(SEQUENCE_OPERATION_DEFINITIONS.map((definition) => [
|
|
274
|
+
definition.operationId,
|
|
275
|
+
definition,
|
|
276
|
+
]));
|
|
277
|
+
export function isSequenceOperationId(value) {
|
|
278
|
+
return sequenceOperationDefinitionsById.has(value);
|
|
279
|
+
}
|
|
280
|
+
export function getSequenceOperationDefinition(operationId) {
|
|
281
|
+
const definition = sequenceOperationDefinitionsById.get(operationId);
|
|
282
|
+
if (!definition) {
|
|
283
|
+
throw new Error(`Unknown sequence operation: ${operationId}`);
|
|
284
|
+
}
|
|
285
|
+
return definition;
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=sequence-operation-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-operation-registry.js","sourceRoot":"","sources":["../src/sequence-operation-registry.ts"],"names":[],"mappings":"AAkDA,MAAM,qBAAqB,GAAG;IAC5B,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,MAAM;IACjB,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;CACmC,CAAC;AAElD,MAAM,gCAAgC,GAAG;IACvC,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,eAAe;IAC1B,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,eAAe;IACpB,GA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AC;IACjD,UAAU,CAAC,WAAW;IACtB,UAAU;CACX,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,qBAAqB,CACnC,KAAa;IAEb,OAAO,gCAAgC,CAAC,GAAG,CAAC,KAA4B,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,WAAgC;IAEhC,MAAM,UAAU,GAAG,gCAAgC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACrE,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type SequenceTimingOperation = {
|
|
2
|
+
operation_id: "timeline.item.trim";
|
|
3
|
+
timeline_item_id: string;
|
|
4
|
+
trim_start_delta_seconds: number;
|
|
5
|
+
trim_end_delta_seconds: number;
|
|
6
|
+
snap_to_frame: boolean;
|
|
7
|
+
} | {
|
|
8
|
+
operation_id: "timeline.item.split";
|
|
9
|
+
timeline_item_id: string;
|
|
10
|
+
split_at_seconds: number;
|
|
11
|
+
snap_to_frame: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type SequenceTimingExecuteOptions = {
|
|
14
|
+
projectId: string;
|
|
15
|
+
operation: SequenceTimingOperation;
|
|
16
|
+
expectedRevision: number | null;
|
|
17
|
+
idempotencyKey: string;
|
|
18
|
+
};
|
|
19
|
+
export type SequenceTimingPreviewOptions = {
|
|
20
|
+
projectId: string;
|
|
21
|
+
operation: SequenceTimingOperation;
|
|
22
|
+
expectedRevision: number | null;
|
|
23
|
+
};
|
|
24
|
+
type SequenceTimingReceiptBase = {
|
|
25
|
+
success: true;
|
|
26
|
+
project_id: string;
|
|
27
|
+
mutation_receipt_id: string;
|
|
28
|
+
idempotency_key: string;
|
|
29
|
+
base_revision: number;
|
|
30
|
+
revision: number;
|
|
31
|
+
replayed: boolean;
|
|
32
|
+
txid: number;
|
|
33
|
+
affected_timeline_item_ids: string[];
|
|
34
|
+
created_timeline_item_ids: string[];
|
|
35
|
+
deleted_timeline_item_ids: string[];
|
|
36
|
+
warnings: string[];
|
|
37
|
+
};
|
|
38
|
+
export type SequenceTimingExecuteResult = (SequenceTimingReceiptBase & {
|
|
39
|
+
operation_id: "timeline.item.trim";
|
|
40
|
+
result: {
|
|
41
|
+
timeline_item_id: string;
|
|
42
|
+
trim_start_units: string;
|
|
43
|
+
trim_end_units: string;
|
|
44
|
+
trim_start_seconds: number;
|
|
45
|
+
trim_end_seconds: number;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
}) | (SequenceTimingReceiptBase & {
|
|
49
|
+
operation_id: "timeline.item.split";
|
|
50
|
+
result: {
|
|
51
|
+
left_timeline_item_id: string;
|
|
52
|
+
right_timeline_item_id: string;
|
|
53
|
+
split_at_units: string;
|
|
54
|
+
split_at_seconds: number;
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
export type SequenceTimingPreviewResult = {
|
|
58
|
+
operation_id: SequenceTimingOperation["operation_id"];
|
|
59
|
+
project_id: string;
|
|
60
|
+
current_revision: number;
|
|
61
|
+
expected_revision: number | null;
|
|
62
|
+
destructive: boolean;
|
|
63
|
+
affected_timeline_item_ids: string[];
|
|
64
|
+
would_create_timeline_item_ids: string[];
|
|
65
|
+
would_delete_timeline_item_ids: string[];
|
|
66
|
+
change_count: number;
|
|
67
|
+
warnings: string[];
|
|
68
|
+
};
|
|
69
|
+
export {};
|
|
70
|
+
//# sourceMappingURL=sequence-timing-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-timing-contract.d.ts","sourceRoot":"","sources":["../src/sequence-timing-contract.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAC/B;IACE,YAAY,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,wBAAwB,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QAC3B,gBAAgB,EAAE,MAAM,CAAC;QACzB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC,GACF,CAAC,yBAAyB,GAAG;IAC3B,YAAY,EAAE,qBAAqB,CAAC;IACpC,MAAM,EAAE;QACN,qBAAqB,EAAE,MAAM,CAAC;QAC9B,sBAAsB,EAAE,MAAM,CAAC;QAC/B,cAAc,EAAE,MAAM,CAAC;QACvB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH,CAAC,CAAC;AAEP,MAAM,MAAM,2BAA2B,GAAG;IACxC,YAAY,EAAE,uBAAuB,CAAC,cAAc,CAAC,CAAC;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;IACrB,0BAA0B,EAAE,MAAM,EAAE,CAAC;IACrC,8BAA8B,EAAE,MAAM,EAAE,CAAC;IACzC,8BAA8B,EAAE,MAAM,EAAE,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequence-timing-contract.js","sourceRoot":"","sources":["../src/sequence-timing-contract.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SequenceOperationItemFailure } from "./error-contract.js";
|
|
2
|
+
export type TimelineBatchMoveResult = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
repositioned_count: number;
|
|
5
|
+
failed_count: number;
|
|
6
|
+
items: Array<{
|
|
7
|
+
timeline_item_id: string;
|
|
8
|
+
previous_start_seconds: number;
|
|
9
|
+
new_start_seconds: number;
|
|
10
|
+
previous_layer_index: number;
|
|
11
|
+
new_layer_index: number;
|
|
12
|
+
}>;
|
|
13
|
+
failed_items: SequenceOperationItemFailure[];
|
|
14
|
+
message?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TimelineBatchTrimResult = {
|
|
17
|
+
success: boolean;
|
|
18
|
+
trimmed_count: number;
|
|
19
|
+
failed_count: number;
|
|
20
|
+
items: Array<{
|
|
21
|
+
timeline_item_id: string;
|
|
22
|
+
success: boolean;
|
|
23
|
+
trim_start_seconds: number | null;
|
|
24
|
+
trim_end_seconds: number | null;
|
|
25
|
+
new_duration_seconds: number | null;
|
|
26
|
+
error: string | null;
|
|
27
|
+
}>;
|
|
28
|
+
failed_items: SequenceOperationItemFailure[];
|
|
29
|
+
message?: string;
|
|
30
|
+
};
|
|
31
|
+
export type TimelineBatchTransformResult = {
|
|
32
|
+
success: boolean;
|
|
33
|
+
updated_count: number;
|
|
34
|
+
failed_count: number;
|
|
35
|
+
items: Array<{
|
|
36
|
+
timeline_item_id: string;
|
|
37
|
+
success: boolean;
|
|
38
|
+
error: string | null;
|
|
39
|
+
}>;
|
|
40
|
+
failed_items: SequenceOperationItemFailure[];
|
|
41
|
+
message?: string;
|
|
42
|
+
};
|
|
43
|
+
export type TimelineBatchDeleteResult = {
|
|
44
|
+
success: boolean;
|
|
45
|
+
deleted_count: number;
|
|
46
|
+
failed_count: number;
|
|
47
|
+
deleted_items: Array<{
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
type: string;
|
|
51
|
+
}>;
|
|
52
|
+
failed_items: SequenceOperationItemFailure[];
|
|
53
|
+
captions_removed: number;
|
|
54
|
+
packed: boolean;
|
|
55
|
+
clips_shifted: number;
|
|
56
|
+
message?: string;
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=timeline-batch-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-batch-contract.d.ts","sourceRoot":"","sources":["../src/timeline-batch-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,MAAM,uBAAuB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AM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;IACH,YAAY,EAAE,4BAA4B,EAAE,CAAC;IAC7C,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-batch-contract.js","sourceRoot":"","sources":["../src/timeline-batch-contract.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blitzreels/contracts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Transport-independent factual contracts for BlitzReels editing operations.",
|
|
5
|
+
"homepage": "https://blitzreels.com/",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/blitzreels/blitzreels.git",
|
|
9
|
+
"directory": "packages/contracts"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/blitzreels/blitzreels/issues"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
36
|
+
}
|
|
37
|
+
}
|