@marcoappio/marco-config 2.0.491 → 2.0.493
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/types/Zero.d.ts +0 -14
- package/dist/types/Zero.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/zero/index.d.ts +1553 -1439
- package/dist/zero/index.d.ts.map +1 -1
- package/dist/zero/index.js +2 -4
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts +108 -6
- package/dist/zero/mutators/accountMutators/accountMutators.d.ts.map +1 -1
- package/dist/zero/mutators/accountMutators/accountMutators.js +59 -34
- package/dist/zero/mutators/defineMutator.d.ts +16 -0
- package/dist/zero/mutators/defineMutator.d.ts.map +1 -0
- package/dist/zero/mutators/defineMutator.js +7 -0
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts +166 -6
- package/dist/zero/mutators/draftMutators/draftMutators.d.ts.map +1 -1
- package/dist/zero/mutators/draftMutators/draftMutators.js +101 -40
- package/dist/zero/mutators/index.d.ts +2 -1
- package/dist/zero/mutators/index.d.ts.map +1 -1
- package/dist/zero/mutators/index.js +2 -1
- package/dist/zero/mutators/mutators.d.ts +438 -28
- package/dist/zero/mutators/mutators.d.ts.map +1 -1
- package/dist/zero/mutators/mutators.js +11 -38
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts +127 -7
- package/dist/zero/mutators/threadMutators/threadMutators.d.ts.map +1 -1
- package/dist/zero/mutators/threadMutators/threadMutators.js +40 -30
- package/dist/zero/mutators/userMutators/userMutators.d.ts +30 -6
- package/dist/zero/mutators/userMutators/userMutators.d.ts.map +1 -1
- package/dist/zero/mutators/userMutators/userMutators.js +25 -11
- package/dist/zero/queries/getAccounts.d.ts +134 -134
- package/dist/zero/queries/getContacts.d.ts +134 -134
- package/dist/zero/queries/getDrafts.d.ts +134 -134
- package/dist/zero/queries/getThread.d.ts +134 -134
- package/dist/zero/queries/getThreadList.d.ts +134 -134
- package/dist/zero/queries/getThreads.d.ts +134 -134
- package/dist/zero/queries/getUser.d.ts +134 -134
- package/dist/zero/queries/index.d.ts +132 -132
- package/dist/zero/schema.d.ts +132 -132
- package/dist/zero/schema.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/types/AuthData.d.ts +0 -4
- package/dist/types/AuthData.d.ts.map +0 -1
- package/dist/types/AuthData.js +0 -1
- package/dist/zero/mutatorSchemas/account.d.ts +0 -80
- package/dist/zero/mutatorSchemas/account.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/account.js +0 -66
- package/dist/zero/mutatorSchemas/draft.d.ts +0 -150
- package/dist/zero/mutatorSchemas/draft.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/draft.js +0 -104
- package/dist/zero/mutatorSchemas/index.d.ts +0 -323
- package/dist/zero/mutatorSchemas/index.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/index.js +0 -10
- package/dist/zero/mutatorSchemas/thread.d.ts +0 -71
- package/dist/zero/mutatorSchemas/thread.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/thread.js +0 -47
- package/dist/zero/mutatorSchemas/user.d.ts +0 -26
- package/dist/zero/mutatorSchemas/user.d.ts.map +0 -1
- package/dist/zero/mutatorSchemas/user.js +0 -27
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts +0 -2
- package/dist/zero/mutators/accountMutators/accountMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/accountMutators/accountMutators.test.js +0 -390
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts +0 -2
- package/dist/zero/mutators/draftMutators/draftMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/draftMutators/draftMutators.test.js +0 -416
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts +0 -2
- package/dist/zero/mutators/threadMutators/threadMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/threadMutators/threadMutators.test.js +0 -755
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts +0 -2
- package/dist/zero/mutators/userMutators/userMutators.test.d.ts.map +0 -1
- package/dist/zero/mutators/userMutators/userMutators.test.js +0 -84
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userMutators.test.d.ts","sourceRoot":"","sources":["../../../../src/zero/mutators/userMutators/userMutators.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, mock } from 'bun:test';
|
|
2
|
-
import { createMutators } from '../mutators';
|
|
3
|
-
describe('userMutators', () => {
|
|
4
|
-
describe('deleteSettingsPushNotificationToken', () => {
|
|
5
|
-
it('deletes push notification token', async () => {
|
|
6
|
-
const tokenDelete = mock(async () => { });
|
|
7
|
-
const transaction = {
|
|
8
|
-
mutate: {
|
|
9
|
-
userPushNotificationToken: {
|
|
10
|
-
delete: tokenDelete,
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
query: {},
|
|
14
|
-
};
|
|
15
|
-
const mutators = createMutators();
|
|
16
|
-
await mutators.user.deleteSettingsPushNotificationToken(transaction, {
|
|
17
|
-
id: 'test-user-id',
|
|
18
|
-
token: 'test-token',
|
|
19
|
-
});
|
|
20
|
-
expect(tokenDelete).toHaveBeenCalledWith({
|
|
21
|
-
id: 'test-user-id',
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
describe('setSettingsName', () => {
|
|
26
|
-
it('sets user name', async () => {
|
|
27
|
-
const userUpdate = mock(async () => { });
|
|
28
|
-
const transaction = {
|
|
29
|
-
mutate: {
|
|
30
|
-
user: {
|
|
31
|
-
update: userUpdate,
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
query: {},
|
|
35
|
-
};
|
|
36
|
-
const mutators = createMutators();
|
|
37
|
-
await mutators.user.setSettingsName(transaction, {
|
|
38
|
-
id: 'test-user-id',
|
|
39
|
-
name: 'John Doe',
|
|
40
|
-
});
|
|
41
|
-
expect(userUpdate).toHaveBeenCalledWith({
|
|
42
|
-
id: 'test-user-id',
|
|
43
|
-
name: 'John Doe',
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
describe('setSettingsPushNotificationToken', () => {
|
|
48
|
-
it('sets push notification token when token does not exist', async () => {
|
|
49
|
-
const run = mock(async () => null);
|
|
50
|
-
const one = mock(() => ({ run }));
|
|
51
|
-
const whereToken = mock(() => ({ one }));
|
|
52
|
-
const whereUserId = mock(() => ({ where: whereToken }));
|
|
53
|
-
const tokenInsert = mock(async () => { });
|
|
54
|
-
const transaction = {
|
|
55
|
-
mutate: {
|
|
56
|
-
userPushNotificationToken: {
|
|
57
|
-
insert: tokenInsert,
|
|
58
|
-
update: mock(async () => { }),
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
query: {
|
|
62
|
-
userPushNotificationToken: {
|
|
63
|
-
where: whereUserId,
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
const mutators = createMutators();
|
|
68
|
-
await mutators.user.setSettingsPushNotificationToken(transaction, {
|
|
69
|
-
id: 'test-user-id',
|
|
70
|
-
pushNotificationToken: {
|
|
71
|
-
createdAt: 1_000,
|
|
72
|
-
id: 'test-user-id-test-device-id',
|
|
73
|
-
token: 'test-token',
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
expect(tokenInsert).toHaveBeenCalledWith({
|
|
77
|
-
createdAt: 1_000,
|
|
78
|
-
id: 'test-user-id-test-device-id',
|
|
79
|
-
token: 'test-token',
|
|
80
|
-
userId: 'test-user-id',
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
});
|