22
33# Namespace: manifest
44
5+ ## Interfaces
6+
7+ * [ FrequencyOptions] ( ../interfaces/manifest.FrequencyOptions.md )
8+ * [ randomDayTimeResult] ( ../interfaces/manifest.randomDayTimeResult.md )
9+
510## Variables
611
712### ROLE_IDENTIFIER
@@ -22,7 +27,7 @@ Legacy login fields declared by some konnectors
2227
2328* Defined in*
2429
25- [ packages/cozy-client/src/models/manifest.js:11 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L11 )
30+ [ packages/cozy-client/src/models/manifest.js:21 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L21 )
2631
2732## Functions
2833
@@ -42,7 +47,59 @@ Legacy login fields declared by some konnectors
4247
4348* Defined in*
4449
45- [ packages/cozy-client/src/models/manifest.js:63] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L63 )
50+ [ packages/cozy-client/src/models/manifest.js:73] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L73 )
51+
52+ ***
53+
54+ ### getCronFromFrequency
55+
56+ ▸ ** getCronFromFrequency** (` frequency ` , ` options? ` ): ` string `
57+
58+ Build a cron string for given frequency with given options
59+ See https://docs.cozy.io/en/cozy-stack/jobs/#cron-syntax
60+
61+ * Parameters*
62+
63+ | Name | Type | Description |
64+ | :------ | :------ | :------ |
65+ | ` frequency ` | ` "hourly" ` | ` "daily" ` | ` "weekly" ` | ` "monthly" ` | Frequency |
66+ | ` options ` | [ ` FrequencyOptions ` ] ( ../interfaces/manifest.FrequencyOptions.md ) | - |
67+
68+ * Returns*
69+
70+ ` string `
71+
72+ * The cron definition for trigger
73+
74+ * Defined in*
75+
76+ [ packages/cozy-client/src/models/manifest.js:280] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L280 )
77+
78+ ***
79+
80+ ### getCronFromKonnector
81+
82+ ▸ ** getCronFromKonnector** (` konnector ` , ` startDate? ` , ` randomDayTimeFn? ` ): ` string `
83+
84+ Build a cron string for given konnector and from a given start date
85+
86+ * Parameters*
87+
88+ | Name | Type | Default value | Description |
89+ | :------ | :------ | :------ | :------ |
90+ | ` konnector ` | ` IOCozyKonnector ` | ` undefined ` | io.cozy.konnectors object |
91+ | ` startDate ` | ` Date ` | ` undefined ` | start date |
92+ | ` randomDayTimeFn ` | ` Function ` | ` randomDayTime ` | - |
93+
94+ * Returns*
95+
96+ ` string `
97+
98+ * The cron definition for trigger
99+
100+ * Defined in*
101+
102+ [ packages/cozy-client/src/models/manifest.js:307] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L307 )
46103
47104***
48105
@@ -66,7 +123,7 @@ The key for the identifier field, example 'login'
66123
67124* Defined in*
68125
69- [ packages/cozy-client/src/models/manifest.js:161 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L161 )
126+ [ packages/cozy-client/src/models/manifest.js:171 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L171 )
70127
71128***
72129
@@ -86,7 +143,33 @@ The key for the identifier field, example 'login'
86143
87144* Defined in*
88145
89- [ packages/cozy-client/src/models/manifest.js:67] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L67 )
146+ [ packages/cozy-client/src/models/manifest.js:77] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L77 )
147+
148+ ***
149+
150+ ### randomDayTime
151+
152+ ▸ ** randomDayTime** (` start? ` , ` end? ` , ` randomize? ` ): [ ` randomDayTimeResult ` ] ( ../interfaces/manifest.randomDayTimeResult.md )
153+
154+ Returns an hour of the day between two hours given in parameters
155+
156+ * Parameters*
157+
158+ | Name | Type | Default value | Description |
159+ | :------ | :------ | :------ | :------ |
160+ | ` start ` | ` number ` | ` 0 ` | minimal start hour |
161+ | ` end ` | ` number ` | ` 1 ` | maximal end hour |
162+ | ` randomize ` | ` Function ` | ` undefined ` | The function used to generate random values |
163+
164+ * Returns*
165+
166+ [ ` randomDayTimeResult ` ] ( ../interfaces/manifest.randomDayTimeResult.md )
167+
168+ Object containing two atributes : hours and minutes
169+
170+ * Defined in*
171+
172+ [ packages/cozy-client/src/models/manifest.js:248] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L248 )
90173
91174***
92175
@@ -108,7 +191,7 @@ Normalize app manifest, retro-compatibility for old manifests
108191
109192* Defined in*
110193
111- [ packages/cozy-client/src/models/manifest.js:77 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L77 )
194+ [ packages/cozy-client/src/models/manifest.js:87 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L87 )
112195
113196***
114197
@@ -132,7 +215,7 @@ sanitized categories
132215
133216* Defined in*
134217
135- [ packages/cozy-client/src/models/manifest.js:56 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L56 )
218+ [ packages/cozy-client/src/models/manifest.js:66 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L66 )
136219
137220***
138221
@@ -156,4 +239,4 @@ Ensures that fields has at least one field with the role 'identifier'
156239
157240* Defined in*
158241
159- [ packages/cozy-client/src/models/manifest.js:130 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L130 )
242+ [ packages/cozy-client/src/models/manifest.js:140 ] ( https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/models/manifest.js#L140 )
0 commit comments