@substrat-run/contract-tests 0.159.0 → 0.160.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.
Files changed (67) hide show
  1. package/dist/attachment-bytes-suite.d.ts +9 -0
  2. package/dist/attachment-bytes-suite.d.ts.map +1 -0
  3. package/dist/attachment-bytes-suite.js +97 -0
  4. package/dist/attachment-bytes-suite.js.map +1 -0
  5. package/dist/connector-fixture.d.ts +2 -2
  6. package/dist/connector-fixture.d.ts.map +1 -1
  7. package/dist/directory-audit-suite.d.ts +17 -0
  8. package/dist/directory-audit-suite.d.ts.map +1 -0
  9. package/dist/directory-audit-suite.js +345 -0
  10. package/dist/directory-audit-suite.js.map +1 -0
  11. package/dist/directory-restore-suite.d.ts.map +1 -1
  12. package/dist/directory-restore-suite.js +99 -0
  13. package/dist/directory-restore-suite.js.map +1 -1
  14. package/dist/index.d.ts +8 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +10 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/many-migrations-suite.d.ts +9 -0
  19. package/dist/many-migrations-suite.d.ts.map +1 -0
  20. package/dist/many-migrations-suite.js +76 -0
  21. package/dist/many-migrations-suite.js.map +1 -0
  22. package/dist/many-migrations.d.ts +16 -0
  23. package/dist/many-migrations.d.ts.map +1 -0
  24. package/dist/many-migrations.js +50 -0
  25. package/dist/many-migrations.js.map +1 -0
  26. package/dist/membership-executor-suite.d.ts.map +1 -1
  27. package/dist/membership-executor-suite.js +8 -5
  28. package/dist/membership-executor-suite.js.map +1 -1
  29. package/dist/modules.d.ts.map +1 -1
  30. package/dist/modules.js +10 -0
  31. package/dist/modules.js.map +1 -1
  32. package/dist/reserved-role-suite.d.ts +6 -0
  33. package/dist/reserved-role-suite.d.ts.map +1 -1
  34. package/dist/reserved-role-suite.js +176 -8
  35. package/dist/reserved-role-suite.js.map +1 -1
  36. package/dist/role-state-suite.d.ts +17 -0
  37. package/dist/role-state-suite.d.ts.map +1 -0
  38. package/dist/role-state-suite.js +80 -0
  39. package/dist/role-state-suite.js.map +1 -0
  40. package/dist/schedule-platform-requests-suite.d.ts +7 -1
  41. package/dist/schedule-platform-requests-suite.d.ts.map +1 -1
  42. package/dist/schedule-platform-requests-suite.js +349 -2
  43. package/dist/schedule-platform-requests-suite.js.map +1 -1
  44. package/dist/schedule-purge-request-module.d.ts +88 -0
  45. package/dist/schedule-purge-request-module.d.ts.map +1 -0
  46. package/dist/schedule-purge-request-module.js +114 -0
  47. package/dist/schedule-purge-request-module.js.map +1 -0
  48. package/dist/schedule-purge-two-module.d.ts +141 -0
  49. package/dist/schedule-purge-two-module.d.ts.map +1 -0
  50. package/dist/schedule-purge-two-module.js +153 -0
  51. package/dist/schedule-purge-two-module.js.map +1 -0
  52. package/dist/scope-host-suite.d.ts.map +1 -1
  53. package/dist/scope-host-suite.js +1177 -7
  54. package/dist/scope-host-suite.js.map +1 -1
  55. package/dist/size-reads-suite.d.ts +20 -0
  56. package/dist/size-reads-suite.d.ts.map +1 -0
  57. package/dist/size-reads-suite.js +77 -0
  58. package/dist/size-reads-suite.js.map +1 -0
  59. package/dist/stored-vertical-copy-suite.d.ts +15 -0
  60. package/dist/stored-vertical-copy-suite.d.ts.map +1 -0
  61. package/dist/stored-vertical-copy-suite.js +68 -0
  62. package/dist/stored-vertical-copy-suite.js.map +1 -0
  63. package/dist/unreadable-scope-row-suite.d.ts +16 -0
  64. package/dist/unreadable-scope-row-suite.d.ts.map +1 -0
  65. package/dist/unreadable-scope-row-suite.js +152 -0
  66. package/dist/unreadable-scope-row-suite.js.map +1 -0
  67. package/package.json +3 -3
@@ -0,0 +1,114 @@
1
+ /**
2
+ * The fixture behind #2440: a purge horizon whose purge operation enqueues a platform request,
3
+ * so `schedulePlatformRequestsContractSuite` can ask whether the schedule run reports what its
4
+ * purges enqueued. Declared the way a vertical declares a purge (`defineEntities`,
5
+ * `purgeSchedulesOf`), as `entity-trash-module.ts` is, in a module of its own so no other
6
+ * suite's sweep counts move.
7
+ *
8
+ * `purgereq/purge` enqueues one request per purge, except for a row named `QUIET_PURGE_ROW`,
9
+ * which enqueues none — the twin that a count of what was enqueued, not of what was purged — and
10
+ * one named `GREEDY_PURGE_ROW`, which enqueues more than a scope will ever have room for (#2506).
11
+ * `purgereq/enqueue` fills the scope's queue with requests of another kind, standing for traffic
12
+ * (or stuck rows) that are not the purge's.
13
+ */
14
+ import { z } from 'zod';
15
+ import { MAX_PENDING_PLATFORM_REQUESTS, defineEntities, defineOperations, manifestEntities, manifestOperations, moduleManifest, operationInputsOf, purgeSchedulesOf, } from '@substrat-run/contracts';
16
+ import { assertAllowed } from '@substrat-run/kernel';
17
+ import { testOperations } from './test-operations.js';
18
+ export const PURGE_REQUEST_MODULE_ID = '@test/purge-request';
19
+ export const PURGE_REQUEST_KIND = 'test.purged';
20
+ export const PURGE_REQUEST_DAYS = 7;
21
+ export const QUIET_PURGE_ROW = 'quiet';
22
+ export const GREEDY_PURGE_ROW = 'greedy';
23
+ export const FILLER_KIND = 'test.filler';
24
+ export const purgeRequestEntities = defineEntities({
25
+ preq: {
26
+ table: 'purgereq_rows',
27
+ fields: z.object({ id: z.string(), name: z.string() }),
28
+ trash: { permission: 'purgereq:trash', purgeAfterDays: PURGE_REQUEST_DAYS },
29
+ },
30
+ });
31
+ const PERMISSIONS = ['purgereq:write', 'purgereq:trash', 'purgereq:purge'];
32
+ const ok = z.object({ ok: z.boolean() });
33
+ export const purgeRequestOperations = defineOperations(purgeRequestEntities, PERMISSIONS)({
34
+ 'purgereq/add': {
35
+ summary: 'Add a row',
36
+ permission: 'purgereq:write',
37
+ input: z.object({ id: z.string(), name: z.string() }),
38
+ output: ok,
39
+ },
40
+ 'purgereq/enqueue': {
41
+ summary: 'Enqueue platform requests that are not a purge\'s',
42
+ permission: 'purgereq:write',
43
+ input: z.object({ count: z.number().int().min(1).max(MAX_PENDING_PLATFORM_REQUESTS) }),
44
+ output: ok,
45
+ },
46
+ 'purgereq/trash': {
47
+ summary: 'Bin a row',
48
+ permission: { key: 'purgereq:trash', entity: 'preq', idFrom: 'rowId' },
49
+ input: z.object({ rowId: z.string() }),
50
+ output: ok,
51
+ },
52
+ 'purgereq/purge': {
53
+ summary: 'Delete a row for good, enqueueing a platform request — the purge horizon runs this',
54
+ permission: { key: 'purgereq:purge', entity: 'preq', idFrom: 'rowId' },
55
+ trashed: 'purges',
56
+ input: z.strictObject({ rowId: z.string() }),
57
+ output: ok,
58
+ },
59
+ });
60
+ const ref = (id) => ({ entityType: 'preq', entityId: id });
61
+ const P = (key) => key;
62
+ export const purgeRequestMod = {
63
+ manifest: moduleManifest.parse({
64
+ id: PURGE_REQUEST_MODULE_ID,
65
+ version: '1.0.0',
66
+ kernelContract: '^0.0.1',
67
+ migrations: { journalDir: './migrations', compatibleFrom: '1.0.0' },
68
+ ...manifestOperations(purgeRequestOperations, {
69
+ permissions: {
70
+ 'purgereq:write': 'add a row',
71
+ 'purgereq:trash': 'bin a row',
72
+ 'purgereq:purge': 'delete a row for good',
73
+ },
74
+ consumes: [],
75
+ }),
76
+ ...manifestEntities(purgeRequestEntities, {}),
77
+ schedules: purgeSchedulesOf(purgeRequestOperations, purgeRequestEntities),
78
+ entitlementKey: 'sched',
79
+ }),
80
+ migrations: [
81
+ { version: '0001-init', sql: 'CREATE TABLE purgereq_rows (id TEXT PRIMARY KEY, name TEXT NOT NULL);' },
82
+ ],
83
+ ...testOperations({
84
+ 'purgereq/add': (async (ctx, i) => {
85
+ assertAllowed(await ctx.check(P('purgereq:write')));
86
+ ctx.sql.exec('INSERT INTO purgereq_rows (id, name) VALUES (?, ?)', [i.id, i.name]);
87
+ return { ok: true };
88
+ }),
89
+ 'purgereq/enqueue': (async (ctx, i) => {
90
+ assertAllowed(await ctx.check(P('purgereq:write')));
91
+ for (let n = 0; n < i.count; n++)
92
+ ctx.requestPlatform({ kind: FILLER_KIND, payload: { n } });
93
+ return { ok: true };
94
+ }),
95
+ 'purgereq/trash': (async (ctx, i) => {
96
+ await ctx.trash(ref(i.rowId));
97
+ return { ok: true };
98
+ }),
99
+ 'purgereq/purge': (async (ctx, i) => {
100
+ assertAllowed(await ctx.check(P('purgereq:purge'), ref(i.rowId)));
101
+ const row = ctx.sql.query('SELECT name FROM purgereq_rows WHERE id = ?', [i.rowId])[0];
102
+ if (!row)
103
+ return { ok: false };
104
+ ctx.sql.exec('DELETE FROM purgereq_rows WHERE id = ?', [i.rowId]);
105
+ // One request per purge; none for the quiet row; more than the cap allows for the greedy one,
106
+ // whose purge therefore rolls back whole however empty the queue is.
107
+ const requests = row.name === QUIET_PURGE_ROW ? 0 : row.name === GREEDY_PURGE_ROW ? MAX_PENDING_PLATFORM_REQUESTS + 1 : 1;
108
+ for (let n = 0; n < requests; n++)
109
+ ctx.requestPlatform({ kind: PURGE_REQUEST_KIND, payload: { rowId: i.rowId } });
110
+ return { ok: true };
111
+ }),
112
+ }, { inputs: operationInputsOf(purgeRequestOperations) }),
113
+ };
114
+ //# sourceMappingURL=schedule-purge-request-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-purge-request-module.js","sourceRoot":"","sources":["../src/schedule-purge-request-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,6BAA6B,EAC7B,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAkD,MAAM,sBAAsB,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAChD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,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AAC,CAAY;QACb,gBAAgB,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAoB,EAAE,EAAE;YACrD,aAAa,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAClE,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAmB,6CAA6C,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzG,IAAI,CAAC,GAAG;gBAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;YAC/B,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,wCAAwC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YAClE,8FAA8F;YAC9F,qEAAqE;YACrE,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,6BAA6B,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC1H,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE;gBAAE,GAAG,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAClH,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;QACtB,CAAC,CAAY;KACd,EACD,EAAE,MAAM,EAAE,iBAAiB,CAAC,sBAAsB,CAAC,EAAE,CACtD;CACF,CAAC"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * The fixture behind #2506's third case: a module with TWO purge horizons, so one
3
+ * `runDueSchedules` call runs two purge schedules back to back with no platform drain between
4
+ * them — the way a module that bins two kinds of entity meets the scope's pending-request cap.
5
+ * `schedulePlatformRequestsContractSuite` fills the queue with the first horizon's purges and asks
6
+ * what the second one's pass does about it.
7
+ *
8
+ * Each purge enqueues one request, except for a row named `QUIET_TWO_ROW`, which enqueues none.
9
+ * In a module of its own, as `schedule-purge-request-module.ts` is, so no other suite's counts move.
10
+ *
11
+ * #2517: it also declares one ORDINARY schedule, `purgetwo/fill`, ahead of the two horizons, as a
12
+ * module's declared schedules come before its derived purges. It fills the scope's queue to the cap
13
+ * when a first-kind row named `FILL_TWO_ROW` exists, and enqueues nothing otherwise, so it fires in
14
+ * every pass and moves no case that adds no such row. Here rather than in a module of its own: every
15
+ * fixture migration lands in the one shared scope, whose read of its applied migrations is capped.
16
+ */
17
+ import { z } from 'zod';
18
+ import { type ModuleRegistration } from '@substrat-run/kernel';
19
+ export declare const PURGE_TWO_MODULE_ID = "@test/purge-two";
20
+ export declare const PURGE_TWO_KIND = "test.purged-two";
21
+ export declare const PURGE_TWO_DAYS = 7;
22
+ export declare const QUIET_TWO_ROW = "quiet";
23
+ /** #2517: a first-kind row by this name, binned or not, makes `purgetwo/fill` fill the queue. */
24
+ export declare const FILL_TWO_ROW = "fill";
25
+ export declare const FILL_TWO_KIND = "test.purge-two-fill";
26
+ export declare const purgeTwoEntities: {
27
+ readonly pa: {
28
+ readonly table: "purgetwo_a";
29
+ readonly fields: z.ZodObject<{
30
+ id: z.ZodString;
31
+ name: z.ZodString;
32
+ }, z.core.$strip>;
33
+ readonly trash: {
34
+ readonly permission: "purgetwo:trash-a";
35
+ readonly purgeAfterDays: 7;
36
+ };
37
+ };
38
+ readonly pb: {
39
+ readonly table: "purgetwo_b";
40
+ readonly fields: z.ZodObject<{
41
+ id: z.ZodString;
42
+ name: z.ZodString;
43
+ }, z.core.$strip>;
44
+ readonly trash: {
45
+ readonly permission: "purgetwo:trash-b";
46
+ readonly purgeAfterDays: 7;
47
+ };
48
+ };
49
+ };
50
+ export declare const purgeTwoOperations: {
51
+ readonly 'purgetwo/add-a': {
52
+ readonly summary: "Add a row";
53
+ readonly permission: "purgetwo:write";
54
+ readonly input: z.ZodObject<{
55
+ id: z.ZodString;
56
+ name: z.ZodString;
57
+ }, z.core.$strip>;
58
+ readonly output: z.ZodObject<{
59
+ ok: z.ZodBoolean;
60
+ }, z.core.$strip>;
61
+ };
62
+ readonly 'purgetwo/add-b': {
63
+ readonly summary: "Add a row";
64
+ readonly permission: "purgetwo:write";
65
+ readonly input: z.ZodObject<{
66
+ id: z.ZodString;
67
+ name: z.ZodString;
68
+ }, z.core.$strip>;
69
+ readonly output: z.ZodObject<{
70
+ ok: z.ZodBoolean;
71
+ }, z.core.$strip>;
72
+ };
73
+ readonly 'purgetwo/trash-a': {
74
+ readonly summary: "Bin a row";
75
+ readonly permission: {
76
+ readonly key: "purgetwo:trash-a";
77
+ readonly entity: "pa";
78
+ readonly idFrom: "rowId";
79
+ };
80
+ readonly input: z.ZodObject<{
81
+ rowId: z.ZodString;
82
+ }, z.core.$strip>;
83
+ readonly output: z.ZodObject<{
84
+ ok: z.ZodBoolean;
85
+ }, z.core.$strip>;
86
+ };
87
+ readonly 'purgetwo/trash-b': {
88
+ readonly summary: "Bin a row";
89
+ readonly permission: {
90
+ readonly key: "purgetwo:trash-b";
91
+ readonly entity: "pb";
92
+ readonly idFrom: "rowId";
93
+ };
94
+ readonly input: z.ZodObject<{
95
+ rowId: z.ZodString;
96
+ }, z.core.$strip>;
97
+ readonly output: z.ZodObject<{
98
+ ok: z.ZodBoolean;
99
+ }, z.core.$strip>;
100
+ };
101
+ readonly 'purgetwo/purge-a': {
102
+ readonly summary: "Delete a row for good, enqueueing a platform request";
103
+ readonly permission: {
104
+ readonly key: "purgetwo:purge-a";
105
+ readonly entity: "pa";
106
+ readonly idFrom: "rowId";
107
+ };
108
+ readonly trashed: "purges";
109
+ readonly input: z.ZodObject<{
110
+ rowId: z.ZodString;
111
+ }, z.core.$strict>;
112
+ readonly output: z.ZodObject<{
113
+ ok: z.ZodBoolean;
114
+ }, z.core.$strip>;
115
+ };
116
+ readonly 'purgetwo/purge-b': {
117
+ readonly summary: "Delete a row for good, enqueueing a platform request";
118
+ readonly permission: {
119
+ readonly key: "purgetwo:purge-b";
120
+ readonly entity: "pb";
121
+ readonly idFrom: "rowId";
122
+ };
123
+ readonly trashed: "purges";
124
+ readonly input: z.ZodObject<{
125
+ rowId: z.ZodString;
126
+ }, z.core.$strict>;
127
+ readonly output: z.ZodObject<{
128
+ ok: z.ZodBoolean;
129
+ }, z.core.$strip>;
130
+ };
131
+ readonly 'purgetwo/fill': {
132
+ readonly summary: "Fill the platform-request queue";
133
+ readonly permission: "purgetwo:fill";
134
+ readonly input: z.ZodObject<{}, z.core.$strip>;
135
+ readonly output: z.ZodObject<{
136
+ ok: z.ZodBoolean;
137
+ }, z.core.$strip>;
138
+ };
139
+ };
140
+ export declare const purgeTwoMod: ModuleRegistration;
141
+ //# sourceMappingURL=schedule-purge-two-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-purge-two-module.d.ts","sourceRoot":"","sources":["../src/schedule-purge-two-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,OAAO,EAAiB,KAAK,kBAAkB,EAAyB,MAAM,sBAAsB,CAAC;AAGrG,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AACrD,eAAO,MAAM,cAAc,oBAAoB,CAAC;AAChD,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,iGAAiG;AACjG,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;CAW3B,CAAC;AAcH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B7B,CAAC;AA8BH,eAAO,MAAM,WAAW,EAAE,kBA2DzB,CAAC"}
@@ -0,0 +1,153 @@
1
+ /**
2
+ * The fixture behind #2506's third case: a module with TWO purge horizons, so one
3
+ * `runDueSchedules` call runs two purge schedules back to back with no platform drain between
4
+ * them — the way a module that bins two kinds of entity meets the scope's pending-request cap.
5
+ * `schedulePlatformRequestsContractSuite` fills the queue with the first horizon's purges and asks
6
+ * what the second one's pass does about it.
7
+ *
8
+ * Each purge enqueues one request, except for a row named `QUIET_TWO_ROW`, which enqueues none.
9
+ * In a module of its own, as `schedule-purge-request-module.ts` is, so no other suite's counts move.
10
+ *
11
+ * #2517: it also declares one ORDINARY schedule, `purgetwo/fill`, ahead of the two horizons, as a
12
+ * module's declared schedules come before its derived purges. It fills the scope's queue to the cap
13
+ * when a first-kind row named `FILL_TWO_ROW` exists, and enqueues nothing otherwise, so it fires in
14
+ * every pass and moves no case that adds no such row. Here rather than in a module of its own: every
15
+ * fixture migration lands in the one shared scope, whose read of its applied migrations is capped.
16
+ */
17
+ import { z } from 'zod';
18
+ import { MAX_PENDING_PLATFORM_REQUESTS, defineEntities, defineOperations, manifestEntities, manifestOperations, moduleManifest, operationInputsOf, purgeSchedulesOf, } from '@substrat-run/contracts';
19
+ import { assertAllowed } from '@substrat-run/kernel';
20
+ import { testOperations } from './test-operations.js';
21
+ export const PURGE_TWO_MODULE_ID = '@test/purge-two';
22
+ export const PURGE_TWO_KIND = 'test.purged-two';
23
+ export const PURGE_TWO_DAYS = 7;
24
+ export const QUIET_TWO_ROW = 'quiet';
25
+ /** #2517: a first-kind row by this name, binned or not, makes `purgetwo/fill` fill the queue. */
26
+ export const FILL_TWO_ROW = 'fill';
27
+ export const FILL_TWO_KIND = 'test.purge-two-fill';
28
+ export const purgeTwoEntities = defineEntities({
29
+ pa: {
30
+ table: 'purgetwo_a',
31
+ fields: z.object({ id: z.string(), name: z.string() }),
32
+ trash: { permission: 'purgetwo:trash-a', purgeAfterDays: PURGE_TWO_DAYS },
33
+ },
34
+ pb: {
35
+ table: 'purgetwo_b',
36
+ fields: z.object({ id: z.string(), name: z.string() }),
37
+ trash: { permission: 'purgetwo:trash-b', purgeAfterDays: PURGE_TWO_DAYS },
38
+ },
39
+ });
40
+ const PERMISSIONS = [
41
+ 'purgetwo:write',
42
+ 'purgetwo:trash-a',
43
+ 'purgetwo:trash-b',
44
+ 'purgetwo:purge-a',
45
+ 'purgetwo:purge-b',
46
+ 'purgetwo:fill',
47
+ ];
48
+ const ok = z.object({ ok: z.boolean() });
49
+ const addInput = z.object({ id: z.string(), name: z.string() });
50
+ const rowInput = z.object({ rowId: z.string() });
51
+ export const purgeTwoOperations = defineOperations(purgeTwoEntities, PERMISSIONS)({
52
+ 'purgetwo/add-a': { summary: 'Add a row', permission: 'purgetwo:write', input: addInput, output: ok },
53
+ 'purgetwo/add-b': { summary: 'Add a row', permission: 'purgetwo:write', input: addInput, output: ok },
54
+ 'purgetwo/trash-a': {
55
+ summary: 'Bin a row',
56
+ permission: { key: 'purgetwo:trash-a', entity: 'pa', idFrom: 'rowId' },
57
+ input: rowInput,
58
+ output: ok,
59
+ },
60
+ 'purgetwo/trash-b': {
61
+ summary: 'Bin a row',
62
+ permission: { key: 'purgetwo:trash-b', entity: 'pb', idFrom: 'rowId' },
63
+ input: rowInput,
64
+ output: ok,
65
+ },
66
+ 'purgetwo/purge-a': {
67
+ summary: 'Delete a row for good, enqueueing a platform request',
68
+ permission: { key: 'purgetwo:purge-a', entity: 'pa', idFrom: 'rowId' },
69
+ trashed: 'purges',
70
+ input: z.strictObject({ rowId: z.string() }),
71
+ output: ok,
72
+ },
73
+ 'purgetwo/purge-b': {
74
+ summary: 'Delete a row for good, enqueueing a platform request',
75
+ permission: { key: 'purgetwo:purge-b', entity: 'pb', idFrom: 'rowId' },
76
+ trashed: 'purges',
77
+ input: z.strictObject({ rowId: z.string() }),
78
+ output: ok,
79
+ },
80
+ 'purgetwo/fill': { summary: 'Fill the platform-request queue', permission: 'purgetwo:fill', input: z.object({}), output: ok },
81
+ });
82
+ const P = (key) => key;
83
+ // The statements are written out per table, never built from a name: a writer whose target is
84
+ // computed is one `lint:attachment-writers` cannot see into.
85
+ const adder = (insert) => (async (ctx, i) => {
86
+ assertAllowed(await ctx.check(P('purgetwo:write')));
87
+ ctx.sql.exec(insert, [i.id, i.name]);
88
+ return { ok: true };
89
+ });
90
+ const trasher = (entityType) => (async (ctx, i) => {
91
+ const ref = { entityType, entityId: i.rowId };
92
+ await ctx.trash(ref);
93
+ return { ok: true };
94
+ });
95
+ const purger = (entityType, select, remove, key) => (async (ctx, i) => {
96
+ assertAllowed(await ctx.check(P(key), { entityType, entityId: i.rowId }));
97
+ const row = ctx.sql.query(select, [i.rowId])[0];
98
+ if (!row)
99
+ return { ok: false };
100
+ ctx.sql.exec(remove, [i.rowId]);
101
+ if (row.name !== QUIET_TWO_ROW)
102
+ ctx.requestPlatform({ kind: PURGE_TWO_KIND, payload: { rowId: i.rowId } });
103
+ return { ok: true };
104
+ });
105
+ export const purgeTwoMod = {
106
+ manifest: moduleManifest.parse({
107
+ id: PURGE_TWO_MODULE_ID,
108
+ version: '1.0.0',
109
+ kernelContract: '^0.0.1',
110
+ migrations: { journalDir: './migrations', compatibleFrom: '1.0.0' },
111
+ ...manifestOperations(purgeTwoOperations, {
112
+ permissions: {
113
+ 'purgetwo:write': 'add a row',
114
+ 'purgetwo:trash-a': 'bin a row of the first kind',
115
+ 'purgetwo:trash-b': 'bin a row of the second kind',
116
+ 'purgetwo:purge-a': 'delete a row of the first kind for good',
117
+ 'purgetwo:purge-b': 'delete a row of the second kind for good',
118
+ 'purgetwo:fill': 'fill the platform-request queue',
119
+ },
120
+ consumes: [],
121
+ }),
122
+ ...manifestEntities(purgeTwoEntities, {}),
123
+ schedules: [
124
+ { operation: 'purgetwo/fill', cadence: { everyMinutes: 60 }, permissions: ['purgetwo:fill'], input: {} },
125
+ ...purgeSchedulesOf(purgeTwoOperations, purgeTwoEntities),
126
+ ],
127
+ entitlementKey: 'sched',
128
+ }),
129
+ migrations: [
130
+ {
131
+ version: '0001-init',
132
+ sql: 'CREATE TABLE purgetwo_a (id TEXT PRIMARY KEY, name TEXT NOT NULL);' +
133
+ 'CREATE TABLE purgetwo_b (id TEXT PRIMARY KEY, name TEXT NOT NULL);',
134
+ },
135
+ ],
136
+ ...testOperations({
137
+ 'purgetwo/add-a': adder('INSERT INTO purgetwo_a (id, name) VALUES (?, ?)'),
138
+ 'purgetwo/add-b': adder('INSERT INTO purgetwo_b (id, name) VALUES (?, ?)'),
139
+ 'purgetwo/trash-a': trasher('pa'),
140
+ 'purgetwo/trash-b': trasher('pb'),
141
+ 'purgetwo/purge-a': purger('pa', 'SELECT name FROM purgetwo_a WHERE id = ?', 'DELETE FROM purgetwo_a WHERE id = ?', 'purgetwo:purge-a'),
142
+ 'purgetwo/purge-b': purger('pb', 'SELECT name FROM purgetwo_b WHERE id = ?', 'DELETE FROM purgetwo_b WHERE id = ?', 'purgetwo:purge-b'),
143
+ 'purgetwo/fill': (async (ctx) => {
144
+ assertAllowed(await ctx.check(P('purgetwo:fill')));
145
+ if (ctx.sql.query('SELECT 1 FROM purgetwo_a WHERE name = ?', [FILL_TWO_ROW]).length === 0)
146
+ return { ok: true };
147
+ for (let n = 0; n < MAX_PENDING_PLATFORM_REQUESTS; n++)
148
+ ctx.requestPlatform({ kind: FILL_TWO_KIND, payload: { n } });
149
+ return { ok: true };
150
+ }),
151
+ }, { inputs: operationInputsOf(purgeTwoOperations) }),
152
+ };
153
+ //# sourceMappingURL=schedule-purge-two-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule-purge-two-module.js","sourceRoot":"","sources":["../src/schedule-purge-two-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,6BAA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