@api-client/core 0.18.38 → 0.18.40
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/RELEASE_SETUP.md +4 -2
- package/build/src/browser.d.ts +1 -1
- package/build/src/browser.d.ts.map +1 -1
- package/build/src/browser.js.map +1 -1
- package/build/src/mocking/ModelingMock.d.ts +19 -0
- package/build/src/mocking/ModelingMock.d.ts.map +1 -0
- package/build/src/mocking/ModelingMock.js +19 -0
- package/build/src/mocking/ModelingMock.js.map +1 -0
- package/build/src/mocking/ProjectMock.js +1 -1
- package/build/src/mocking/ProjectMock.js.map +1 -1
- package/build/src/mocking/lib/File.d.ts +34 -0
- package/build/src/mocking/lib/File.d.ts.map +1 -0
- package/build/src/mocking/lib/File.js +64 -0
- package/build/src/mocking/lib/File.js.map +1 -0
- package/build/src/mocking/lib/Group.d.ts +16 -0
- package/build/src/mocking/lib/Group.d.ts.map +1 -0
- package/build/src/mocking/lib/Group.js +39 -0
- package/build/src/mocking/lib/Group.js.map +1 -0
- package/build/src/mocking/lib/Invitation.d.ts +16 -0
- package/build/src/mocking/lib/Invitation.d.ts.map +1 -0
- package/build/src/mocking/lib/Invitation.js +42 -0
- package/build/src/mocking/lib/Invitation.js.map +1 -0
- package/build/src/mocking/lib/Organization.d.ts +16 -0
- package/build/src/mocking/lib/Organization.d.ts.map +1 -0
- package/build/src/mocking/lib/Organization.js +34 -0
- package/build/src/mocking/lib/Organization.js.map +1 -0
- package/build/src/mocking/lib/Patch.d.ts +29 -0
- package/build/src/mocking/lib/Patch.d.ts.map +1 -0
- package/build/src/mocking/lib/Patch.js +102 -0
- package/build/src/mocking/lib/Patch.js.map +1 -0
- package/build/src/mocking/lib/Trash.d.ts +16 -0
- package/build/src/mocking/lib/Trash.d.ts.map +1 -0
- package/build/src/mocking/lib/Trash.js +39 -0
- package/build/src/mocking/lib/Trash.js.map +1 -0
- package/build/src/mocking/lib/User.d.ts +12 -12
- package/build/src/mocking/lib/User.d.ts.map +1 -1
- package/build/src/mocking/lib/User.js +29 -26
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/sdk/SdkMock.d.ts +129 -156
- package/build/src/sdk/SdkMock.d.ts.map +1 -1
- package/build/src/sdk/SdkMock.js +816 -634
- package/build/src/sdk/SdkMock.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/data/models/example-generator-api.json +6 -6
- package/package.json +7 -4
- package/src/mocking/ModelingMock.ts +19 -0
- package/src/mocking/ProjectMock.ts +1 -1
- package/src/mocking/lib/File.ts +72 -0
- package/src/mocking/lib/Group.ts +52 -0
- package/src/mocking/lib/Invitation.ts +58 -0
- package/src/mocking/lib/Organization.ts +42 -0
- package/src/mocking/lib/Patch.ts +128 -0
- package/src/mocking/lib/Trash.ts +47 -0
- package/src/mocking/lib/User.ts +30 -29
- package/src/sdk/SdkMock.ts +1141 -692
- package/TESTING_READY.md +0 -114
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
export interface MockResponseOptions {
|
|
1
|
+
import { type ResponseGenerator, type MockHandler, type SetupWorkerOptions, type InterceptOptions } from '@jarrodek/amw';
|
|
2
|
+
import { ModelingMock } from '../mocking/ModelingMock.js';
|
|
3
|
+
export interface MockResult {
|
|
6
4
|
/**
|
|
7
|
-
* Custom response
|
|
5
|
+
* Custom response generator for the mock intercept.
|
|
8
6
|
*/
|
|
9
|
-
|
|
7
|
+
response?: ResponseGenerator;
|
|
10
8
|
/**
|
|
11
|
-
*
|
|
9
|
+
* If true, the request body will be generated using the body generator.
|
|
10
|
+
* It is useful when only setting up response headers or status code, but
|
|
11
|
+
* the request body should still be generated, even when missing in the `response` option.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
forceBody?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface MockListResult extends MockResult {
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
17
|
+
* Number of items to generate in the list response.
|
|
16
18
|
*/
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* A stub reference that can be used to restore the original behavior.
|
|
21
|
-
*/
|
|
22
|
-
export interface StubReference {
|
|
19
|
+
size?: number;
|
|
23
20
|
/**
|
|
24
|
-
*
|
|
21
|
+
* If true, the response will include a cursor for pagination.
|
|
22
|
+
* If false, the response will not include a cursor.
|
|
23
|
+
* If not set, a random choice will be made.
|
|
25
24
|
*/
|
|
26
|
-
|
|
25
|
+
cursor?: boolean;
|
|
27
26
|
}
|
|
28
27
|
/**
|
|
29
|
-
* SDK mocking utility for testing.
|
|
30
|
-
*
|
|
28
|
+
* SDK mocking utility for testing. Uses Service Workers to intercept HTTP requests
|
|
29
|
+
* and provide mock responses for API calls.
|
|
30
|
+
*
|
|
31
|
+
* This class uses the `@jarrodek/amw` library to set up a Service Worker that intercepts
|
|
32
|
+
* fetch requests matching the configured routes. Each method adds an intercept for a specific
|
|
33
|
+
* API endpoint, returning either random generated data or custom responses.
|
|
31
34
|
*
|
|
32
35
|
* @example
|
|
33
36
|
* ```typescript
|
|
@@ -35,62 +38,103 @@ export interface StubReference {
|
|
|
35
38
|
* import { StoreSdk } from '@api-client/core/sdk/StoreSdkWeb.js';
|
|
36
39
|
*
|
|
37
40
|
* const sdk = new StoreSdk('http://localhost:8080');
|
|
38
|
-
* const mocker = new SdkMock(
|
|
41
|
+
* const mocker = new SdkMock({
|
|
42
|
+
* swPath: '/mockServiceWorker.js', // Path to the Service Worker script
|
|
43
|
+
* base: 'http://localhost:8080' // Base URL matching the SDK
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* // Initialize the Service Worker
|
|
47
|
+
* await mocker.setup();
|
|
48
|
+
*
|
|
49
|
+
* // Add intercept - returns random organizations
|
|
50
|
+
* await mocker.organizations.list();
|
|
39
51
|
*
|
|
40
|
-
* //
|
|
41
|
-
*
|
|
52
|
+
* // Custom response with specific data
|
|
53
|
+
* await mocker.organizations.create({
|
|
54
|
+
* response: {
|
|
55
|
+
* status: 201,
|
|
56
|
+
* headers: { 'Content-Type': 'application/json', 'X-Custom-Header': 'value' },
|
|
57
|
+
* body: JSON.stringify({ key: 'custom-id', name: 'Custom Org' })
|
|
58
|
+
* }
|
|
59
|
+
* });
|
|
42
60
|
*
|
|
43
|
-
* //
|
|
44
|
-
*
|
|
45
|
-
*
|
|
61
|
+
* // Control pagination in list responses
|
|
62
|
+
* await mocker.groups.list({
|
|
63
|
+
* size: 10, // Number of items to generate
|
|
64
|
+
* cursor: true // Include pagination cursor
|
|
46
65
|
* });
|
|
47
66
|
*
|
|
48
|
-
* //
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
67
|
+
* // Error simulation
|
|
68
|
+
* await mocker.users.me({
|
|
69
|
+
* response: {
|
|
70
|
+
* status: 404,
|
|
71
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
72
|
+
* body: JSON.stringify({ error: 'Not found' })
|
|
73
|
+
* }
|
|
52
74
|
* });
|
|
53
75
|
*
|
|
54
|
-
* //
|
|
55
|
-
* mocker.
|
|
76
|
+
* // Remove all intercepts (keep Service Worker active)
|
|
77
|
+
* await mocker.reset();
|
|
78
|
+
*
|
|
79
|
+
* // Stop and remove the Service Worker
|
|
80
|
+
* await mocker.teardown();
|
|
56
81
|
* ```
|
|
82
|
+
*
|
|
83
|
+
* @TODO: Add a in-memory state store so that mocks can maintain state across requests.
|
|
84
|
+
* This way, operations like create, update, delete can affect subsequent list/read calls
|
|
85
|
+
* and we can mimic the API behavior more closely.
|
|
57
86
|
*/
|
|
58
87
|
export declare class SdkMock {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
88
|
+
options?: SetupWorkerOptions | undefined;
|
|
89
|
+
handler?: MockHandler;
|
|
90
|
+
gen: ModelingMock;
|
|
91
|
+
constructor(options?: SetupWorkerOptions | undefined);
|
|
92
|
+
/**
|
|
93
|
+
* Initializes the mock handler. It uses options provided in the constructor.
|
|
94
|
+
* It has to be called before using any of the mock methods.
|
|
95
|
+
*/
|
|
96
|
+
setup(): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Removes the mock worker and all intercepts.
|
|
99
|
+
*/
|
|
100
|
+
teardown(): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Removes all added intercepts.
|
|
103
|
+
*/
|
|
104
|
+
reset(): Promise<void>;
|
|
105
|
+
get mock(): MockHandler;
|
|
106
|
+
protected createCursorOption(init?: MockListResult): string | undefined;
|
|
107
|
+
protected createDefaultResponse(status: number, headers?: Record<string, string>, body?: () => string, userConfig?: MockResult): ResponseGenerator;
|
|
62
108
|
/**
|
|
63
109
|
* Organization API mocks.
|
|
64
110
|
*/
|
|
65
111
|
organizations: {
|
|
66
112
|
/**
|
|
67
|
-
*
|
|
68
|
-
* @param options Optional response
|
|
69
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
113
|
+
* Adds an intercept to mock the `organizations.list()` method.
|
|
114
|
+
* @param options Optional response configuration
|
|
70
115
|
*/
|
|
71
|
-
list: (options?:
|
|
116
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
72
117
|
/**
|
|
73
|
-
*
|
|
74
|
-
* @param options Optional response
|
|
75
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
118
|
+
* Adds an intercept to mock the `organizations.create()` method.
|
|
119
|
+
* @param options Optional response configuration
|
|
76
120
|
*/
|
|
77
|
-
create: (options?:
|
|
121
|
+
create: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
78
122
|
invitations: {
|
|
79
|
-
list: (options?:
|
|
80
|
-
create: (options?:
|
|
81
|
-
findByToken: (options?:
|
|
82
|
-
decline: (options?:
|
|
83
|
-
delete: (options?:
|
|
84
|
-
patch: (options?:
|
|
85
|
-
resend: (options?:
|
|
123
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
124
|
+
create: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
125
|
+
findByToken: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
126
|
+
decline: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
127
|
+
delete: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
128
|
+
patch: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
129
|
+
resend: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
86
130
|
};
|
|
87
131
|
users: {
|
|
88
|
-
list: (options?:
|
|
89
|
-
read: (options?:
|
|
90
|
-
readBatch: (options?:
|
|
91
|
-
activate: (options?:
|
|
92
|
-
deactivate: (options?:
|
|
93
|
-
delete: (options?:
|
|
132
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
133
|
+
read: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
134
|
+
readBatch: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
135
|
+
activate: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
136
|
+
deactivate: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
137
|
+
delete: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
94
138
|
};
|
|
95
139
|
};
|
|
96
140
|
/**
|
|
@@ -100,41 +144,31 @@ export declare class SdkMock {
|
|
|
100
144
|
/**
|
|
101
145
|
* Mocks the `groups.list()` method.
|
|
102
146
|
* @param options Optional response customization.
|
|
103
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
104
147
|
*/
|
|
105
|
-
list: (options?:
|
|
148
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
106
149
|
/**
|
|
107
150
|
* Mocks the `groups.create()` method.
|
|
108
151
|
* @param options Optional response customization.
|
|
109
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
110
|
-
*/
|
|
111
|
-
create: (options?: MockResponseOptions) => StubReference;
|
|
112
|
-
/**
|
|
113
|
-
* Mocks the `groups.read()` method.
|
|
114
|
-
* @param options Optional response customization.
|
|
115
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
116
152
|
*/
|
|
117
|
-
|
|
153
|
+
create: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
118
154
|
/**
|
|
119
155
|
* Mocks the `groups.update()` method.
|
|
120
156
|
* @param options Optional response customization.
|
|
121
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
122
157
|
*/
|
|
123
|
-
update: (options?:
|
|
158
|
+
update: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
124
159
|
/**
|
|
125
160
|
* Mocks the `groups.delete()` method.
|
|
126
161
|
* @param options Optional response customization.
|
|
127
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
128
162
|
*/
|
|
129
|
-
delete: (options?:
|
|
163
|
+
delete: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
130
164
|
/**
|
|
131
165
|
* Mocks the `groups.addUsers()` method.
|
|
132
166
|
*/
|
|
133
|
-
addUsers: (options?:
|
|
167
|
+
addUsers: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
134
168
|
/**
|
|
135
169
|
* Mocks the `groups.removeUsers()` method.
|
|
136
170
|
*/
|
|
137
|
-
removeUsers: (options?:
|
|
171
|
+
removeUsers: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
138
172
|
};
|
|
139
173
|
/**
|
|
140
174
|
* User API mocks.
|
|
@@ -143,9 +177,8 @@ export declare class SdkMock {
|
|
|
143
177
|
/**
|
|
144
178
|
* Mocks the `user.me()` method.
|
|
145
179
|
* @param options Optional response customization.
|
|
146
|
-
* @returns A stub reference that can be used to restore the original behavior.
|
|
147
180
|
*/
|
|
148
|
-
me: (options?:
|
|
181
|
+
me: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
149
182
|
};
|
|
150
183
|
/**
|
|
151
184
|
* Files API mocks.
|
|
@@ -154,146 +187,86 @@ export declare class SdkMock {
|
|
|
154
187
|
/**
|
|
155
188
|
* Mocks the `file.list()` method.
|
|
156
189
|
*/
|
|
157
|
-
list: (options?:
|
|
190
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
158
191
|
/**
|
|
159
192
|
* Mocks the `file.createMeta()` method.
|
|
160
193
|
*/
|
|
161
|
-
createMeta: (options?:
|
|
194
|
+
createMeta: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
162
195
|
/**
|
|
163
196
|
* Mocks the `file.createMedia()` method.
|
|
164
197
|
*/
|
|
165
|
-
createMedia: (options?:
|
|
198
|
+
createMedia: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
166
199
|
/**
|
|
167
200
|
* Mocks the `file.create()` method.
|
|
168
201
|
*/
|
|
169
|
-
create: (options?:
|
|
202
|
+
create: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
170
203
|
/**
|
|
171
204
|
* Mocks the `file.createFolder()` method.
|
|
172
205
|
*/
|
|
173
|
-
createFolder: (options?:
|
|
206
|
+
createFolder: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
174
207
|
/**
|
|
175
208
|
* Mocks the `file.read()` method.
|
|
176
209
|
*/
|
|
177
|
-
read: (options?:
|
|
210
|
+
read: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
178
211
|
/**
|
|
179
212
|
* Mocks the `file.readMedia()` method.
|
|
180
213
|
*/
|
|
181
|
-
readMedia: (options?:
|
|
214
|
+
readMedia: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
182
215
|
/**
|
|
183
216
|
* Mocks the `file.readBulk()` method.
|
|
184
217
|
*/
|
|
185
|
-
readBulk: (options?:
|
|
218
|
+
readBulk: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
186
219
|
/**
|
|
187
220
|
* Mocks the `file.patch()` method.
|
|
188
221
|
*/
|
|
189
|
-
patch: (options?:
|
|
222
|
+
patch: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
190
223
|
/**
|
|
191
224
|
* Mocks the `file.patchMedia()` method.
|
|
192
225
|
*/
|
|
193
|
-
patchMedia: (options?:
|
|
226
|
+
patchMedia: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
194
227
|
/**
|
|
195
228
|
* Mocks the `file.delete()` method.
|
|
196
229
|
*/
|
|
197
|
-
delete: (options?:
|
|
230
|
+
delete: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
198
231
|
/**
|
|
199
232
|
* Mocks the `file.deleteBulk()` method.
|
|
200
233
|
*/
|
|
201
|
-
deleteBulk: (options?:
|
|
234
|
+
deleteBulk: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
202
235
|
/**
|
|
203
236
|
* Mocks the `file.patchUsers()` method.
|
|
204
237
|
*/
|
|
205
|
-
patchUsers: (options?:
|
|
238
|
+
patchUsers: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
206
239
|
/**
|
|
207
240
|
* Mocks the `file.addUser()` method.
|
|
208
241
|
*/
|
|
209
|
-
addUser: (options?:
|
|
242
|
+
addUser: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
210
243
|
/**
|
|
211
244
|
* Mocks the `file.removeUser()` method.
|
|
212
245
|
*/
|
|
213
|
-
removeUser: (options?:
|
|
246
|
+
removeUser: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
214
247
|
/**
|
|
215
248
|
* Mocks the `file.listUsers()` method.
|
|
216
249
|
*/
|
|
217
|
-
listUsers: (options?:
|
|
250
|
+
listUsers: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
218
251
|
/**
|
|
219
252
|
* Mocks the `file.breadcrumbs()` method.
|
|
220
253
|
*/
|
|
221
|
-
breadcrumbs: (options?:
|
|
254
|
+
breadcrumbs: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
222
255
|
};
|
|
223
256
|
/**
|
|
224
257
|
* Shared API mocks.
|
|
225
258
|
*/
|
|
226
259
|
shared: {
|
|
227
|
-
list: (options?:
|
|
260
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
228
261
|
};
|
|
229
262
|
/**
|
|
230
263
|
* Trash API mocks.
|
|
231
264
|
*/
|
|
232
265
|
trash: {
|
|
233
|
-
list: (options?:
|
|
234
|
-
delete: (options?:
|
|
235
|
-
restore: (options?:
|
|
236
|
-
empty: (options?:
|
|
266
|
+
list: (init?: MockListResult, options?: InterceptOptions) => Promise<void>;
|
|
267
|
+
delete: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
268
|
+
restore: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
269
|
+
empty: (init?: MockResult, options?: InterceptOptions) => Promise<void>;
|
|
237
270
|
};
|
|
238
|
-
/**
|
|
239
|
-
* Restores all stubs created by this mocker.
|
|
240
|
-
*/
|
|
241
|
-
restore(): void;
|
|
242
|
-
/**
|
|
243
|
-
* Creates a stub for a specific SDK method.
|
|
244
|
-
* @param api The API name (e.g., 'organizations', 'groups', 'user', 'auth').
|
|
245
|
-
* @param method The method name to stub.
|
|
246
|
-
* @param implementation The stub implementation that returns the mocked data.
|
|
247
|
-
* @returns A stub reference.
|
|
248
|
-
*/
|
|
249
|
-
private createStub;
|
|
250
|
-
/**
|
|
251
|
-
* Generates a random organization object.
|
|
252
|
-
*/
|
|
253
|
-
private generateOrganization;
|
|
254
|
-
/**
|
|
255
|
-
* Generates a random group object.
|
|
256
|
-
*/
|
|
257
|
-
private generateGroup;
|
|
258
|
-
/**
|
|
259
|
-
* Generates a random user object.
|
|
260
|
-
*/
|
|
261
|
-
private generateUser;
|
|
262
|
-
/**
|
|
263
|
-
* Generates a random file meta object.
|
|
264
|
-
*/
|
|
265
|
-
private generateFile;
|
|
266
|
-
/**
|
|
267
|
-
* Generates a random folder meta object.
|
|
268
|
-
*/
|
|
269
|
-
private generateFolder;
|
|
270
|
-
/**
|
|
271
|
-
* Generates a random media patch revision object.
|
|
272
|
-
*/
|
|
273
|
-
private generateMediaPatchRevision;
|
|
274
|
-
/**
|
|
275
|
-
* Generates a random breadcrumbs list.
|
|
276
|
-
*/
|
|
277
|
-
private generateBreadcrumbs;
|
|
278
|
-
/**
|
|
279
|
-
* Generates a random invitation object.
|
|
280
|
-
*/
|
|
281
|
-
private generateInvitation;
|
|
282
|
-
/**
|
|
283
|
-
* Generates a random trash entry.
|
|
284
|
-
*/
|
|
285
|
-
private generateTrashEntry;
|
|
286
|
-
/**
|
|
287
|
-
* Generates a random string.
|
|
288
|
-
*/
|
|
289
|
-
private randomString;
|
|
290
|
-
/**
|
|
291
|
-
* Returns a random choice from an array.
|
|
292
|
-
*/
|
|
293
|
-
private randomChoice;
|
|
294
|
-
/**
|
|
295
|
-
* Generates a random hex color.
|
|
296
|
-
*/
|
|
297
|
-
private randomColor;
|
|
298
271
|
}
|
|
299
272
|
//# sourceMappingURL=SdkMock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SdkMock.d.ts","sourceRoot":"","sources":["../../../src/sdk/SdkMock.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SdkMock.d.ts","sourceRoot":"","sources":["../../../src/sdk/SdkMock.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AAStB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;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