files.com 1.1.637 → 1.1.638
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.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/scheduled_export.md +228 -0
- data/lib/files.com/models/scheduled_export.rb +353 -0
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aff4a7ed74ed5745ce895e30fdc22a7169f696d72fab0a93e1216e8cd7da258c
|
|
4
|
+
data.tar.gz: 35efd4e1e5c213a870f32a5f068b07dc8299bc1f0ce648aa9583c25e1452fe4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 590d8a8a1b08f18a52e69da3319ffda678518c8a25af8e052e2e3e40ec46113da6cb064f6d45c710c5bb3cbc6686fefc93a5623faeb64870f126eeb0e1043807
|
|
7
|
+
data.tar.gz: 70dea5d8398f5dc6a4d339b44763dc087df8146777462c5d0db518993ba9a3b38a900c159c10aad15da7833683e55a420384b6810c406f29c1dad3cb86026b97
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.638
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# ScheduledExport
|
|
2
|
+
|
|
3
|
+
## Example ScheduledExport Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"id": 1,
|
|
8
|
+
"name": "Monthly access review",
|
|
9
|
+
"export_type": "permission_audit",
|
|
10
|
+
"report_name": "Permission audit",
|
|
11
|
+
"export_options": {
|
|
12
|
+
"group_by": "user"
|
|
13
|
+
},
|
|
14
|
+
"user_id": 1,
|
|
15
|
+
"disabled": true,
|
|
16
|
+
"trigger": "daily",
|
|
17
|
+
"interval": "month",
|
|
18
|
+
"recurring_day": 1,
|
|
19
|
+
"schedule_days_of_week": [
|
|
20
|
+
1,
|
|
21
|
+
3,
|
|
22
|
+
5
|
|
23
|
+
],
|
|
24
|
+
"schedule_times_of_day": [
|
|
25
|
+
"06:30"
|
|
26
|
+
],
|
|
27
|
+
"schedule_time_zone": "Eastern Time (US & Canada)",
|
|
28
|
+
"holiday_region": "us",
|
|
29
|
+
"human_readable_schedule": "Runs every month at 06:30 AM UTC TZ.",
|
|
30
|
+
"last_run_at": "2000-01-01T01:00:00Z",
|
|
31
|
+
"last_export_id": 1,
|
|
32
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
33
|
+
"updated_at": "2000-01-01T01:00:00Z"
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
* `id` (int64): Scheduled Export ID
|
|
38
|
+
* `name` (string): Name for this scheduled export.
|
|
39
|
+
* `export_type` (string): Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
40
|
+
* `report_name` (string): Human-readable report name.
|
|
41
|
+
* `export_options` (object): Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
42
|
+
* `user_id` (int64): Site Admin user who receives the completed export e-mail.
|
|
43
|
+
* `disabled` (boolean): If true, this scheduled export will not run.
|
|
44
|
+
* `trigger` (string): Schedule trigger type: `daily` or `custom_schedule`.
|
|
45
|
+
* `interval` (string): If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
46
|
+
* `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
47
|
+
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
48
|
+
* `schedule_times_of_day` (array(string)): Times of day in HH:MM format for schedule-driven exports.
|
|
49
|
+
* `schedule_time_zone` (string): Time zone used by the scheduled export.
|
|
50
|
+
* `holiday_region` (string): Optional holiday region used by schedule-driven exports.
|
|
51
|
+
* `human_readable_schedule` (string): Human-readable schedule description.
|
|
52
|
+
* `last_run_at` (date-time): Most recent scheduled run time.
|
|
53
|
+
* `last_export_id` (int64): Most recent Export ID created by this schedule.
|
|
54
|
+
* `created_at` (date-time): Creation time.
|
|
55
|
+
* `updated_at` (date-time): Last update time.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## List Scheduled Exports
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Files::ScheduledExport.list
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
69
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
70
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `export_type` or `disabled`.
|
|
71
|
+
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled` and `export_type`.
|
|
72
|
+
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Show Scheduled Export
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Files::ScheduledExport.find(id)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Parameters
|
|
84
|
+
|
|
85
|
+
* `id` (int64): Required - Scheduled Export ID.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Create Scheduled Export
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Files::ScheduledExport.create(
|
|
94
|
+
name: "Monthly access review",
|
|
95
|
+
export_type: "permission_audit",
|
|
96
|
+
export_options: {"group_by":"user"},
|
|
97
|
+
user_id: 1,
|
|
98
|
+
disabled: true,
|
|
99
|
+
trigger: "daily",
|
|
100
|
+
interval: "month",
|
|
101
|
+
recurring_day: 1,
|
|
102
|
+
schedule_days_of_week: [1,3,5],
|
|
103
|
+
schedule_times_of_day: ["06:30"],
|
|
104
|
+
schedule_time_zone: "Eastern Time (US & Canada)",
|
|
105
|
+
holiday_region: "us"
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Parameters
|
|
110
|
+
|
|
111
|
+
* `name` (string): Required - Name for this scheduled export.
|
|
112
|
+
* `export_type` (string): Required - Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
113
|
+
* `export_options` (object): Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
114
|
+
* `user_id` (int64): Site Admin user who receives the completed export e-mail.
|
|
115
|
+
* `disabled` (boolean): If true, this scheduled export will not run.
|
|
116
|
+
* `trigger` (string): Schedule trigger type: `daily` or `custom_schedule`.
|
|
117
|
+
* `interval` (string): If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
118
|
+
* `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
119
|
+
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
120
|
+
* `schedule_times_of_day` (array(string)): Times of day in HH:MM format for schedule-driven exports.
|
|
121
|
+
* `schedule_time_zone` (string): Time zone used by the scheduled export.
|
|
122
|
+
* `holiday_region` (string): Optional holiday region used by schedule-driven exports.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Update Scheduled Export
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Files::ScheduledExport.update(id,
|
|
131
|
+
name: "Monthly access review",
|
|
132
|
+
export_type: "permission_audit",
|
|
133
|
+
export_options: {"group_by":"user"},
|
|
134
|
+
user_id: 1,
|
|
135
|
+
disabled: true,
|
|
136
|
+
trigger: "daily",
|
|
137
|
+
interval: "month",
|
|
138
|
+
recurring_day: 1,
|
|
139
|
+
schedule_days_of_week: [1,3,5],
|
|
140
|
+
schedule_times_of_day: ["06:30"],
|
|
141
|
+
schedule_time_zone: "Eastern Time (US & Canada)",
|
|
142
|
+
holiday_region: "us"
|
|
143
|
+
)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
* `id` (int64): Required - Scheduled Export ID.
|
|
149
|
+
* `name` (string): Name for this scheduled export.
|
|
150
|
+
* `export_type` (string): Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
151
|
+
* `export_options` (object): Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
152
|
+
* `user_id` (int64): Site Admin user who receives the completed export e-mail.
|
|
153
|
+
* `disabled` (boolean): If true, this scheduled export will not run.
|
|
154
|
+
* `trigger` (string): Schedule trigger type: `daily` or `custom_schedule`.
|
|
155
|
+
* `interval` (string): If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
156
|
+
* `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
157
|
+
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
158
|
+
* `schedule_times_of_day` (array(string)): Times of day in HH:MM format for schedule-driven exports.
|
|
159
|
+
* `schedule_time_zone` (string): Time zone used by the scheduled export.
|
|
160
|
+
* `holiday_region` (string): Optional holiday region used by schedule-driven exports.
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Delete Scheduled Export
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
Files::ScheduledExport.delete(id)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Parameters
|
|
172
|
+
|
|
173
|
+
* `id` (int64): Required - Scheduled Export ID.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Update Scheduled Export
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
scheduled_export = Files::ScheduledExport.find(id)
|
|
182
|
+
|
|
183
|
+
scheduled_export.update(
|
|
184
|
+
name: "Monthly access review",
|
|
185
|
+
export_type: "permission_audit",
|
|
186
|
+
export_options: {"group_by":"user"},
|
|
187
|
+
user_id: 1,
|
|
188
|
+
disabled: true,
|
|
189
|
+
trigger: "daily",
|
|
190
|
+
interval: "month",
|
|
191
|
+
recurring_day: 1,
|
|
192
|
+
schedule_days_of_week: [1,3,5],
|
|
193
|
+
schedule_times_of_day: ["06:30"],
|
|
194
|
+
schedule_time_zone: "Eastern Time (US & Canada)",
|
|
195
|
+
holiday_region: "us"
|
|
196
|
+
)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Parameters
|
|
200
|
+
|
|
201
|
+
* `id` (int64): Required - Scheduled Export ID.
|
|
202
|
+
* `name` (string): Name for this scheduled export.
|
|
203
|
+
* `export_type` (string): Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
204
|
+
* `export_options` (object): Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
205
|
+
* `user_id` (int64): Site Admin user who receives the completed export e-mail.
|
|
206
|
+
* `disabled` (boolean): If true, this scheduled export will not run.
|
|
207
|
+
* `trigger` (string): Schedule trigger type: `daily` or `custom_schedule`.
|
|
208
|
+
* `interval` (string): If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
209
|
+
* `recurring_day` (int64): If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
210
|
+
* `schedule_days_of_week` (array(int64)): If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
211
|
+
* `schedule_times_of_day` (array(string)): Times of day in HH:MM format for schedule-driven exports.
|
|
212
|
+
* `schedule_time_zone` (string): Time zone used by the scheduled export.
|
|
213
|
+
* `holiday_region` (string): Optional holiday region used by schedule-driven exports.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Delete Scheduled Export
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
scheduled_export = Files::ScheduledExport.find(id)
|
|
222
|
+
|
|
223
|
+
scheduled_export.delete
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Parameters
|
|
227
|
+
|
|
228
|
+
* `id` (int64): Required - Scheduled Export ID.
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class ScheduledExport
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# int64 - Scheduled Export ID
|
|
13
|
+
def id
|
|
14
|
+
@attributes[:id]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def id=(value)
|
|
18
|
+
@attributes[:id] = value
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# string - Name for this scheduled export.
|
|
22
|
+
def name
|
|
23
|
+
@attributes[:name]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def name=(value)
|
|
27
|
+
@attributes[:name] = value
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# string - Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
31
|
+
def export_type
|
|
32
|
+
@attributes[:export_type]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def export_type=(value)
|
|
36
|
+
@attributes[:export_type] = value
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# string - Human-readable report name.
|
|
40
|
+
def report_name
|
|
41
|
+
@attributes[:report_name]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def report_name=(value)
|
|
45
|
+
@attributes[:report_name] = value
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# object - Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
49
|
+
def export_options
|
|
50
|
+
@attributes[:export_options]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def export_options=(value)
|
|
54
|
+
@attributes[:export_options] = value
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# int64 - Site Admin user who receives the completed export e-mail.
|
|
58
|
+
def user_id
|
|
59
|
+
@attributes[:user_id]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def user_id=(value)
|
|
63
|
+
@attributes[:user_id] = value
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# boolean - If true, this scheduled export will not run.
|
|
67
|
+
def disabled
|
|
68
|
+
@attributes[:disabled]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def disabled=(value)
|
|
72
|
+
@attributes[:disabled] = value
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# string - Schedule trigger type: `daily` or `custom_schedule`.
|
|
76
|
+
def trigger
|
|
77
|
+
@attributes[:trigger]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def trigger=(value)
|
|
81
|
+
@attributes[:trigger] = value
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# string - If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
85
|
+
def interval
|
|
86
|
+
@attributes[:interval]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def interval=(value)
|
|
90
|
+
@attributes[:interval] = value
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
94
|
+
def recurring_day
|
|
95
|
+
@attributes[:recurring_day]
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def recurring_day=(value)
|
|
99
|
+
@attributes[:recurring_day] = value
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
103
|
+
def schedule_days_of_week
|
|
104
|
+
@attributes[:schedule_days_of_week]
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def schedule_days_of_week=(value)
|
|
108
|
+
@attributes[:schedule_days_of_week] = value
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# array(string) - Times of day in HH:MM format for schedule-driven exports.
|
|
112
|
+
def schedule_times_of_day
|
|
113
|
+
@attributes[:schedule_times_of_day]
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def schedule_times_of_day=(value)
|
|
117
|
+
@attributes[:schedule_times_of_day] = value
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# string - Time zone used by the scheduled export.
|
|
121
|
+
def schedule_time_zone
|
|
122
|
+
@attributes[:schedule_time_zone]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def schedule_time_zone=(value)
|
|
126
|
+
@attributes[:schedule_time_zone] = value
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# string - Optional holiday region used by schedule-driven exports.
|
|
130
|
+
def holiday_region
|
|
131
|
+
@attributes[:holiday_region]
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def holiday_region=(value)
|
|
135
|
+
@attributes[:holiday_region] = value
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# string - Human-readable schedule description.
|
|
139
|
+
def human_readable_schedule
|
|
140
|
+
@attributes[:human_readable_schedule]
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def human_readable_schedule=(value)
|
|
144
|
+
@attributes[:human_readable_schedule] = value
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# date-time - Most recent scheduled run time.
|
|
148
|
+
def last_run_at
|
|
149
|
+
@attributes[:last_run_at]
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def last_run_at=(value)
|
|
153
|
+
@attributes[:last_run_at] = value
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# int64 - Most recent Export ID created by this schedule.
|
|
157
|
+
def last_export_id
|
|
158
|
+
@attributes[:last_export_id]
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def last_export_id=(value)
|
|
162
|
+
@attributes[:last_export_id] = value
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# date-time - Creation time.
|
|
166
|
+
def created_at
|
|
167
|
+
@attributes[:created_at]
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# date-time - Last update time.
|
|
171
|
+
def updated_at
|
|
172
|
+
@attributes[:updated_at]
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Parameters:
|
|
176
|
+
# name - string - Name for this scheduled export.
|
|
177
|
+
# export_type - string - Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
178
|
+
# export_options - object - Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
179
|
+
# user_id - int64 - Site Admin user who receives the completed export e-mail.
|
|
180
|
+
# disabled - boolean - If true, this scheduled export will not run.
|
|
181
|
+
# trigger - string - Schedule trigger type: `daily` or `custom_schedule`.
|
|
182
|
+
# interval - string - If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
183
|
+
# recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
184
|
+
# schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
185
|
+
# schedule_times_of_day - array(string) - Times of day in HH:MM format for schedule-driven exports.
|
|
186
|
+
# schedule_time_zone - string - Time zone used by the scheduled export.
|
|
187
|
+
# holiday_region - string - Optional holiday region used by schedule-driven exports.
|
|
188
|
+
def update(params = {})
|
|
189
|
+
params ||= {}
|
|
190
|
+
params[:id] = @attributes[:id]
|
|
191
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
192
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
193
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
194
|
+
raise InvalidParameterError.new("Bad parameter: export_type must be an String") if params[:export_type] and !params[:export_type].is_a?(String)
|
|
195
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
196
|
+
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
|
|
197
|
+
raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
|
|
198
|
+
raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
|
|
199
|
+
raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
|
|
200
|
+
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
|
|
201
|
+
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
|
|
202
|
+
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
|
|
203
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
204
|
+
|
|
205
|
+
Api.send_request("/scheduled_exports/#{@attributes[:id]}", :patch, params, @options)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
def delete(params = {})
|
|
209
|
+
params ||= {}
|
|
210
|
+
params[:id] = @attributes[:id]
|
|
211
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
|
212
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
213
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
214
|
+
|
|
215
|
+
Api.send_request("/scheduled_exports/#{@attributes[:id]}", :delete, params, @options)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def destroy(params = {})
|
|
219
|
+
delete(params)
|
|
220
|
+
nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def save
|
|
224
|
+
if @attributes[:id]
|
|
225
|
+
new_obj = update(@attributes)
|
|
226
|
+
else
|
|
227
|
+
new_obj = ScheduledExport.create(@attributes, @options)
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@attributes = new_obj.attributes
|
|
231
|
+
true
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Parameters:
|
|
235
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
236
|
+
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
237
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `name`, `export_type` or `disabled`.
|
|
238
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `disabled` and `export_type`.
|
|
239
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `export_type`.
|
|
240
|
+
def self.list(params = {}, options = {})
|
|
241
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
242
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
243
|
+
raise InvalidParameterError.new("Bad parameter: sort_by must be an Hash") if params[:sort_by] and !params[:sort_by].is_a?(Hash)
|
|
244
|
+
raise InvalidParameterError.new("Bad parameter: filter must be an Hash") if params[:filter] and !params[:filter].is_a?(Hash)
|
|
245
|
+
raise InvalidParameterError.new("Bad parameter: filter_prefix must be an Hash") if params[:filter_prefix] and !params[:filter_prefix].is_a?(Hash)
|
|
246
|
+
|
|
247
|
+
List.new(ScheduledExport, params) do
|
|
248
|
+
Api.send_request("/scheduled_exports", :get, params, options)
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
def self.all(params = {}, options = {})
|
|
253
|
+
list(params, options)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Parameters:
|
|
257
|
+
# id (required) - int64 - Scheduled Export ID.
|
|
258
|
+
def self.find(id, params = {}, options = {})
|
|
259
|
+
params ||= {}
|
|
260
|
+
params[:id] = id
|
|
261
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
262
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
263
|
+
|
|
264
|
+
response, options = Api.send_request("/scheduled_exports/#{params[:id]}", :get, params, options)
|
|
265
|
+
ScheduledExport.new(response.data, options)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
def self.get(id, params = {}, options = {})
|
|
269
|
+
find(id, params, options)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Parameters:
|
|
273
|
+
# name (required) - string - Name for this scheduled export.
|
|
274
|
+
# export_type (required) - string - Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
275
|
+
# export_options - object - Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
276
|
+
# user_id - int64 - Site Admin user who receives the completed export e-mail.
|
|
277
|
+
# disabled - boolean - If true, this scheduled export will not run.
|
|
278
|
+
# trigger - string - Schedule trigger type: `daily` or `custom_schedule`.
|
|
279
|
+
# interval - string - If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
280
|
+
# recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
281
|
+
# schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
282
|
+
# schedule_times_of_day - array(string) - Times of day in HH:MM format for schedule-driven exports.
|
|
283
|
+
# schedule_time_zone - string - Time zone used by the scheduled export.
|
|
284
|
+
# holiday_region - string - Optional holiday region used by schedule-driven exports.
|
|
285
|
+
def self.create(params = {}, options = {})
|
|
286
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
287
|
+
raise InvalidParameterError.new("Bad parameter: export_type must be an String") if params[:export_type] and !params[:export_type].is_a?(String)
|
|
288
|
+
raise InvalidParameterError.new("Bad parameter: export_options must be an Hash") if params[:export_options] and !params[:export_options].is_a?(Hash)
|
|
289
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
290
|
+
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
|
|
291
|
+
raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
|
|
292
|
+
raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
|
|
293
|
+
raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
|
|
294
|
+
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
|
|
295
|
+
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
|
|
296
|
+
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
|
|
297
|
+
raise MissingParameterError.new("Parameter missing: name") unless params[:name]
|
|
298
|
+
raise MissingParameterError.new("Parameter missing: export_type") unless params[:export_type]
|
|
299
|
+
|
|
300
|
+
response, options = Api.send_request("/scheduled_exports", :post, params, options)
|
|
301
|
+
ScheduledExport.new(response.data, options)
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Parameters:
|
|
305
|
+
# name - string - Name for this scheduled export.
|
|
306
|
+
# export_type - string - Export report type. Valid values: folder_size_audit, group_membership_audit, permission_audit, share_link_audit
|
|
307
|
+
# export_options - object - Report-specific options. `permission_audit` supports `group_by` with `user` or `path`.
|
|
308
|
+
# user_id - int64 - Site Admin user who receives the completed export e-mail.
|
|
309
|
+
# disabled - boolean - If true, this scheduled export will not run.
|
|
310
|
+
# trigger - string - Schedule trigger type: `daily` or `custom_schedule`.
|
|
311
|
+
# interval - string - If trigger is `daily`, this specifies how often to run the scheduled export.
|
|
312
|
+
# recurring_day - int64 - If trigger is `daily`, this selects the day number inside the chosen interval.
|
|
313
|
+
# schedule_days_of_week - array(int64) - If trigger is `custom_schedule`, the 0-based weekdays used by the schedule.
|
|
314
|
+
# schedule_times_of_day - array(string) - Times of day in HH:MM format for schedule-driven exports.
|
|
315
|
+
# schedule_time_zone - string - Time zone used by the scheduled export.
|
|
316
|
+
# holiday_region - string - Optional holiday region used by schedule-driven exports.
|
|
317
|
+
def self.update(id, params = {}, options = {})
|
|
318
|
+
params ||= {}
|
|
319
|
+
params[:id] = id
|
|
320
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
321
|
+
raise InvalidParameterError.new("Bad parameter: name must be an String") if params[:name] and !params[:name].is_a?(String)
|
|
322
|
+
raise InvalidParameterError.new("Bad parameter: export_type must be an String") if params[:export_type] and !params[:export_type].is_a?(String)
|
|
323
|
+
raise InvalidParameterError.new("Bad parameter: export_options must be an Hash") if params[:export_options] and !params[:export_options].is_a?(Hash)
|
|
324
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
|
325
|
+
raise InvalidParameterError.new("Bad parameter: trigger must be an String") if params[:trigger] and !params[:trigger].is_a?(String)
|
|
326
|
+
raise InvalidParameterError.new("Bad parameter: interval must be an String") if params[:interval] and !params[:interval].is_a?(String)
|
|
327
|
+
raise InvalidParameterError.new("Bad parameter: recurring_day must be an Integer") if params[:recurring_day] and !params[:recurring_day].is_a?(Integer)
|
|
328
|
+
raise InvalidParameterError.new("Bad parameter: schedule_days_of_week must be an Array") if params[:schedule_days_of_week] and !params[:schedule_days_of_week].is_a?(Array)
|
|
329
|
+
raise InvalidParameterError.new("Bad parameter: schedule_times_of_day must be an Array") if params[:schedule_times_of_day] and !params[:schedule_times_of_day].is_a?(Array)
|
|
330
|
+
raise InvalidParameterError.new("Bad parameter: schedule_time_zone must be an String") if params[:schedule_time_zone] and !params[:schedule_time_zone].is_a?(String)
|
|
331
|
+
raise InvalidParameterError.new("Bad parameter: holiday_region must be an String") if params[:holiday_region] and !params[:holiday_region].is_a?(String)
|
|
332
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
333
|
+
|
|
334
|
+
response, options = Api.send_request("/scheduled_exports/#{params[:id]}", :patch, params, options)
|
|
335
|
+
ScheduledExport.new(response.data, options)
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
def self.delete(id, params = {}, options = {})
|
|
339
|
+
params ||= {}
|
|
340
|
+
params[:id] = id
|
|
341
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
342
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
343
|
+
|
|
344
|
+
Api.send_request("/scheduled_exports/#{params[:id]}", :delete, params, options)
|
|
345
|
+
nil
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
def self.destroy(id, params = {}, options = {})
|
|
349
|
+
delete(id, params, options)
|
|
350
|
+
nil
|
|
351
|
+
end
|
|
352
|
+
end
|
|
353
|
+
end
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
|
@@ -129,6 +129,7 @@ require "files.com/models/remote_server_configuration_file"
|
|
|
129
129
|
require "files.com/models/remote_server_credential"
|
|
130
130
|
require "files.com/models/request"
|
|
131
131
|
require "files.com/models/restore"
|
|
132
|
+
require "files.com/models/scheduled_export"
|
|
132
133
|
require "files.com/models/scim_log"
|
|
133
134
|
require "files.com/models/session"
|
|
134
135
|
require "files.com/models/settings_change"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.638
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -268,6 +268,7 @@ files:
|
|
|
268
268
|
- docs/remote_server_credential.md
|
|
269
269
|
- docs/request.md
|
|
270
270
|
- docs/restore.md
|
|
271
|
+
- docs/scheduled_export.md
|
|
271
272
|
- docs/scim_log.md
|
|
272
273
|
- docs/session.md
|
|
273
274
|
- docs/settings_change.md
|
|
@@ -406,6 +407,7 @@ files:
|
|
|
406
407
|
- lib/files.com/models/remote_server_credential.rb
|
|
407
408
|
- lib/files.com/models/request.rb
|
|
408
409
|
- lib/files.com/models/restore.rb
|
|
410
|
+
- lib/files.com/models/scheduled_export.rb
|
|
409
411
|
- lib/files.com/models/scim_log.rb
|
|
410
412
|
- lib/files.com/models/session.rb
|
|
411
413
|
- lib/files.com/models/settings_change.rb
|