@girs/ecal-2.0 2.0.0-3.0.4 → 2.0.0-3.2.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  ![downloads/week](https://img.shields.io/npm/dw/@girs/ecal-2.0)
6
6
 
7
7
 
8
- GJS TypeScript type definitions for ECal-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.0.4.
8
+ GJS TypeScript type definitions for ECal-2.0, generated from library version 2.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.0.
9
9
 
10
10
  This package is a client library for evolution calendars.
11
11
 
package/ecal-2.0.d.cts CHANGED
@@ -932,6 +932,8 @@ export function util_foreach_category(comp: ICalGLib.Component, func: UtilForeac
932
932
  * structure, or %NULL if no alarm instances occurred in the specified time
933
933
  * range. Free the returned structure with e_cal_component_alarms_free(),
934
934
  * when no longer needed.
935
+ *
936
+ * See e_cal_util_generate_alarms_for_uid_sync()
935
937
  * @param comp The #ECalComponent to generate alarms from
936
938
  * @param start Start time
937
939
  * @param end End time
@@ -946,6 +948,8 @@ export function util_generate_alarms_for_comp(comp: Component, start: number, en
946
948
  * instances for them; putting them in the `comp_alarms` list. Free the `comp_alarms`
947
949
  * with g_slist_free_full (comp_alarms, e_cal_component_alarms_free);, when
948
950
  * no longer neeed.
951
+ *
952
+ * See e_cal_util_generate_alarms_for_uid_sync()
949
953
  * @param comps List of #ECalComponent<!-- -->s
950
954
  * @param start Start time
951
955
  * @param end End time
@@ -955,6 +959,25 @@ export function util_generate_alarms_for_comp(comp: Component, start: number, en
955
959
  * @returns the number of elements it added to the list
956
960
  */
957
961
  export function util_generate_alarms_for_list(comps: Component[], start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone): [ /* returnType */ number, /* comp_alarms */ ComponentAlarms[] ]
962
+ /**
963
+ * Generates alarm instances for a calendar component with UID `uid,`
964
+ * which is stored within the `client`. In contrast to e_cal_util_generate_alarms_for_comp(),
965
+ * this function handles detached instances of recurring events properly.
966
+ *
967
+ * Returns the instances structure, or %NULL if no alarm instances occurred in the specified
968
+ * time range. Free the returned structure with e_cal_component_alarms_free(),
969
+ * when no longer needed.
970
+ * @param client an #ECalClient
971
+ * @param uid a component UID to generate alarms for
972
+ * @param start start time
973
+ * @param end end time
974
+ * @param omit alarm types to omit
975
+ * @param resolve_tzid Callback for resolving timezones
976
+ * @param default_timezone The timezone used to resolve DATE and floating DATE-TIME values
977
+ * @param cancellable
978
+ * @returns a list of all the alarms found for the given component in the given time range.
979
+ */
980
+ export function util_generate_alarms_for_uid_sync(client: any | null, uid: string | null, start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone, cancellable: Gio.Cancellable | null): ComponentAlarms | null
958
981
  /**
959
982
  * Find out when the component starts and stops, being careful about
960
983
  * recurrences.
@@ -976,6 +999,17 @@ export function util_get_system_timezone(): ICalGLib.Timezone | null
976
999
  * @returns system timezone location string, %NULL on an error.
977
1000
  */
978
1001
  export function util_get_system_timezone_location(): string | null
1002
+ /**
1003
+ * Checks whether the `comp` has any alarms in the given time interval.
1004
+ * @param comp an #ECalComponent to check alarms for
1005
+ * @param start start time
1006
+ * @param end end time
1007
+ * @param omit alarm types to omit
1008
+ * @param resolve_tzid Callback for resolving timezones
1009
+ * @param default_timezone The timezone used to resolve DATE and floating DATE-TIME values.
1010
+ * @returns %TRUE, when the #comp has any alarms in the given time interval
1011
+ */
1012
+ export function util_has_alarms_in_range(comp: Component, start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone): boolean
979
1013
  /**
980
1014
  * Converts an #ICalTime into a GLibc's struct tm.
981
1015
  * @param itt An #ICalTime
@@ -1593,6 +1627,21 @@ export interface Client extends TimezoneCache, Gio.AsyncInitable, Gio.Initable {
1593
1627
  * @param cb Callback for each generated instance
1594
1628
  */
1595
1629
  generate_instances_for_object_sync(icalcomp: ICalGLib.Component, start: number, end: number, cancellable: Gio.Cancellable | null, cb: RecurInstanceCb): void
1630
+ /**
1631
+ * Does a combination of e_cal_client_get_object_list() and
1632
+ * e_cal_recur_generate_instances_sync(), like
1633
+ * e_cal_client_generate_instances_sync(), but for a single object.
1634
+ *
1635
+ * The callback function should do a g_object_ref() of the calendar component
1636
+ * it gets passed if it intends to keep it around, since it will be unref'ed
1637
+ * as soon as the callback returns.
1638
+ * @param uid A component UID to generate instances for
1639
+ * @param start Start time for query
1640
+ * @param end End time for query
1641
+ * @param cancellable a #GCancellable; can be %NULL
1642
+ * @param cb Callback for each generated instance
1643
+ */
1644
+ generate_instances_for_uid_sync(uid: string | null, start: number, end: number, cancellable: Gio.Cancellable | null, cb: RecurInstanceCb): void
1596
1645
  /**
1597
1646
  * Does a combination of e_cal_client_get_object_list() and
1598
1647
  * e_cal_recur_generate_instances_sync().
@@ -3813,11 +3862,18 @@ export interface ComponentAlarmInstance {
3813
3862
  * @returns a newly allocated copy of @instance
3814
3863
  */
3815
3864
  copy(): ComponentAlarmInstance
3865
+ get_component(): any | null
3816
3866
  get_occur_end(): number
3817
3867
  get_occur_start(): number
3818
3868
  get_rid(): string | null
3819
3869
  get_time(): number
3820
3870
  get_uid(): string | null
3871
+ /**
3872
+ * Sets `component` as the component associated with the `instance`.
3873
+ * It can be %NULL to unset it.
3874
+ * @param component an #ECalComponent or %NULL
3875
+ */
3876
+ set_component(component: any | null): void
3821
3877
  /**
3822
3878
  * Set the actual event occurrence end to which this `instance` corresponds.
3823
3879
  * @param occur_end event occurence end to set
@@ -4116,9 +4172,9 @@ export interface ComponentAlarms {
4116
4172
  copy(): ComponentAlarms
4117
4173
  /**
4118
4174
  * The returned component is valid until the `alarms` is freed.
4119
- * @returns an #ECalComponent associated with the @alarms structure
4175
+ * @returns an #ECalComponent associated with the @alarms structure, or %NULL
4120
4176
  */
4121
- get_component(): Component
4177
+ get_component(): Component | null
4122
4178
  /**
4123
4179
  * The returned #GSList is owned by `alarms` and should not be modified.
4124
4180
  * It's valid until the `alarms` is freed or the list of instances is not
@@ -4169,19 +4225,25 @@ export class ComponentAlarms {
4169
4225
  /**
4170
4226
  * Creates a new #ECalComponentAlarms structure, associated with `comp`.
4171
4227
  * Free the alarms with e_cal_component_alarms_free(), when no longer needed.
4228
+ *
4229
+ * The `comp` can be %NULL since 3.48, in which case the respective instances hold
4230
+ * the component they belong to.
4172
4231
  * @constructor
4173
- * @param comp the actual alarm component, as #ECalComponent
4232
+ * @param comp the actual alarm component, as #ECalComponent, or %NULL
4174
4233
  * @returns a newly allocated #ECalComponentAlarms
4175
4234
  */
4176
- constructor(comp: Component)
4235
+ constructor(comp: Component | null)
4177
4236
  /**
4178
4237
  * Creates a new #ECalComponentAlarms structure, associated with `comp`.
4179
4238
  * Free the alarms with e_cal_component_alarms_free(), when no longer needed.
4239
+ *
4240
+ * The `comp` can be %NULL since 3.48, in which case the respective instances hold
4241
+ * the component they belong to.
4180
4242
  * @constructor
4181
- * @param comp the actual alarm component, as #ECalComponent
4243
+ * @param comp the actual alarm component, as #ECalComponent, or %NULL
4182
4244
  * @returns a newly allocated #ECalComponentAlarms
4183
4245
  */
4184
- static new(comp: Component): ComponentAlarms
4246
+ static new(comp: Component | null): ComponentAlarms
4185
4247
  }
4186
4248
 
4187
4249
  export interface ComponentAttendee {
package/ecal-2.0.d.ts CHANGED
@@ -934,6 +934,8 @@ function util_foreach_category(comp: ICalGLib.Component, func: UtilForeachCatego
934
934
  * structure, or %NULL if no alarm instances occurred in the specified time
935
935
  * range. Free the returned structure with e_cal_component_alarms_free(),
936
936
  * when no longer needed.
937
+ *
938
+ * See e_cal_util_generate_alarms_for_uid_sync()
937
939
  * @param comp The #ECalComponent to generate alarms from
938
940
  * @param start Start time
939
941
  * @param end End time
@@ -948,6 +950,8 @@ function util_generate_alarms_for_comp(comp: Component, start: number, end: numb
948
950
  * instances for them; putting them in the `comp_alarms` list. Free the `comp_alarms`
949
951
  * with g_slist_free_full (comp_alarms, e_cal_component_alarms_free);, when
950
952
  * no longer neeed.
953
+ *
954
+ * See e_cal_util_generate_alarms_for_uid_sync()
951
955
  * @param comps List of #ECalComponent<!-- -->s
952
956
  * @param start Start time
953
957
  * @param end End time
@@ -957,6 +961,25 @@ function util_generate_alarms_for_comp(comp: Component, start: number, end: numb
957
961
  * @returns the number of elements it added to the list
958
962
  */
959
963
  function util_generate_alarms_for_list(comps: Component[], start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone): [ /* returnType */ number, /* comp_alarms */ ComponentAlarms[] ]
964
+ /**
965
+ * Generates alarm instances for a calendar component with UID `uid,`
966
+ * which is stored within the `client`. In contrast to e_cal_util_generate_alarms_for_comp(),
967
+ * this function handles detached instances of recurring events properly.
968
+ *
969
+ * Returns the instances structure, or %NULL if no alarm instances occurred in the specified
970
+ * time range. Free the returned structure with e_cal_component_alarms_free(),
971
+ * when no longer needed.
972
+ * @param client an #ECalClient
973
+ * @param uid a component UID to generate alarms for
974
+ * @param start start time
975
+ * @param end end time
976
+ * @param omit alarm types to omit
977
+ * @param resolve_tzid Callback for resolving timezones
978
+ * @param default_timezone The timezone used to resolve DATE and floating DATE-TIME values
979
+ * @param cancellable
980
+ * @returns a list of all the alarms found for the given component in the given time range.
981
+ */
982
+ function util_generate_alarms_for_uid_sync(client: any | null, uid: string | null, start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone, cancellable: Gio.Cancellable | null): ComponentAlarms | null
960
983
  /**
961
984
  * Find out when the component starts and stops, being careful about
962
985
  * recurrences.
@@ -978,6 +1001,17 @@ function util_get_system_timezone(): ICalGLib.Timezone | null
978
1001
  * @returns system timezone location string, %NULL on an error.
979
1002
  */
980
1003
  function util_get_system_timezone_location(): string | null
1004
+ /**
1005
+ * Checks whether the `comp` has any alarms in the given time interval.
1006
+ * @param comp an #ECalComponent to check alarms for
1007
+ * @param start start time
1008
+ * @param end end time
1009
+ * @param omit alarm types to omit
1010
+ * @param resolve_tzid Callback for resolving timezones
1011
+ * @param default_timezone The timezone used to resolve DATE and floating DATE-TIME values.
1012
+ * @returns %TRUE, when the #comp has any alarms in the given time interval
1013
+ */
1014
+ function util_has_alarms_in_range(comp: Component, start: number, end: number, omit: ComponentAlarmAction, resolve_tzid: RecurResolveTimezoneCb, default_timezone: ICalGLib.Timezone): boolean
981
1015
  /**
982
1016
  * Converts an #ICalTime into a GLibc's struct tm.
983
1017
  * @param itt An #ICalTime
@@ -1595,6 +1629,21 @@ interface Client extends TimezoneCache, Gio.AsyncInitable, Gio.Initable {
1595
1629
  * @param cb Callback for each generated instance
1596
1630
  */
1597
1631
  generate_instances_for_object_sync(icalcomp: ICalGLib.Component, start: number, end: number, cancellable: Gio.Cancellable | null, cb: RecurInstanceCb): void
1632
+ /**
1633
+ * Does a combination of e_cal_client_get_object_list() and
1634
+ * e_cal_recur_generate_instances_sync(), like
1635
+ * e_cal_client_generate_instances_sync(), but for a single object.
1636
+ *
1637
+ * The callback function should do a g_object_ref() of the calendar component
1638
+ * it gets passed if it intends to keep it around, since it will be unref'ed
1639
+ * as soon as the callback returns.
1640
+ * @param uid A component UID to generate instances for
1641
+ * @param start Start time for query
1642
+ * @param end End time for query
1643
+ * @param cancellable a #GCancellable; can be %NULL
1644
+ * @param cb Callback for each generated instance
1645
+ */
1646
+ generate_instances_for_uid_sync(uid: string | null, start: number, end: number, cancellable: Gio.Cancellable | null, cb: RecurInstanceCb): void
1598
1647
  /**
1599
1648
  * Does a combination of e_cal_client_get_object_list() and
1600
1649
  * e_cal_recur_generate_instances_sync().
@@ -3815,11 +3864,18 @@ interface ComponentAlarmInstance {
3815
3864
  * @returns a newly allocated copy of @instance
3816
3865
  */
3817
3866
  copy(): ComponentAlarmInstance
3867
+ get_component(): any | null
3818
3868
  get_occur_end(): number
3819
3869
  get_occur_start(): number
3820
3870
  get_rid(): string | null
3821
3871
  get_time(): number
3822
3872
  get_uid(): string | null
3873
+ /**
3874
+ * Sets `component` as the component associated with the `instance`.
3875
+ * It can be %NULL to unset it.
3876
+ * @param component an #ECalComponent or %NULL
3877
+ */
3878
+ set_component(component: any | null): void
3823
3879
  /**
3824
3880
  * Set the actual event occurrence end to which this `instance` corresponds.
3825
3881
  * @param occur_end event occurence end to set
@@ -4118,9 +4174,9 @@ interface ComponentAlarms {
4118
4174
  copy(): ComponentAlarms
4119
4175
  /**
4120
4176
  * The returned component is valid until the `alarms` is freed.
4121
- * @returns an #ECalComponent associated with the @alarms structure
4177
+ * @returns an #ECalComponent associated with the @alarms structure, or %NULL
4122
4178
  */
4123
- get_component(): Component
4179
+ get_component(): Component | null
4124
4180
  /**
4125
4181
  * The returned #GSList is owned by `alarms` and should not be modified.
4126
4182
  * It's valid until the `alarms` is freed or the list of instances is not
@@ -4171,19 +4227,25 @@ class ComponentAlarms {
4171
4227
  /**
4172
4228
  * Creates a new #ECalComponentAlarms structure, associated with `comp`.
4173
4229
  * Free the alarms with e_cal_component_alarms_free(), when no longer needed.
4230
+ *
4231
+ * The `comp` can be %NULL since 3.48, in which case the respective instances hold
4232
+ * the component they belong to.
4174
4233
  * @constructor
4175
- * @param comp the actual alarm component, as #ECalComponent
4234
+ * @param comp the actual alarm component, as #ECalComponent, or %NULL
4176
4235
  * @returns a newly allocated #ECalComponentAlarms
4177
4236
  */
4178
- constructor(comp: Component)
4237
+ constructor(comp: Component | null)
4179
4238
  /**
4180
4239
  * Creates a new #ECalComponentAlarms structure, associated with `comp`.
4181
4240
  * Free the alarms with e_cal_component_alarms_free(), when no longer needed.
4241
+ *
4242
+ * The `comp` can be %NULL since 3.48, in which case the respective instances hold
4243
+ * the component they belong to.
4182
4244
  * @constructor
4183
- * @param comp the actual alarm component, as #ECalComponent
4245
+ * @param comp the actual alarm component, as #ECalComponent, or %NULL
4184
4246
  * @returns a newly allocated #ECalComponentAlarms
4185
4247
  */
4186
- static new(comp: Component): ComponentAlarms
4248
+ static new(comp: Component | null): ComponentAlarms
4187
4249
  }
4188
4250
 
4189
4251
  interface ComponentAttendee {
package/package.json CHANGED
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "name": "@girs/ecal-2.0",
3
- "version": "2.0.0-3.0.4",
3
+ "version": "2.0.0-3.2.0",
4
4
  "description": "GJS TypeScript type definitions for ECal-2.0, generated from library version 2.0.0",
5
5
  "type": "module",
6
6
  "module": "ecal-2.0.js",
7
7
  "main": "ecal-2.0.js",
8
- "typedoc": {
9
- "entryPoint": "./ecal-2.0.d.ts",
10
- "readmeFile": "./README.md",
11
- "displayName": "ECal-2.0",
12
- "tsconfig": "./tsconfig.doc.json"
13
- },
14
8
  "exports": {
15
9
  "./ambient": "./ecal-2.0-ambient.d.ts",
16
10
  "./import": "./ecal-2.0-import.d.ts",
@@ -27,20 +21,20 @@
27
21
  },
28
22
  "scripts": {
29
23
  "test": "yarn test:esm && yarn test:cjs",
30
- "test:esm": "tsc --noEmit ecal-2.0.d.ts",
31
- "test:cjs": "tsc --noEmit ecal-2.0.d.cts"
24
+ "test:esm": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit ecal-2.0.d.ts",
25
+ "test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit ecal-2.0.d.cts"
32
26
  },
33
27
  "dependencies": {
34
- "@girs/camel-1.2": "^1.2.0-3.0.4",
35
- "@girs/edataserver-1.2": "^1.2.0-3.0.4",
36
- "@girs/gio-2.0": "^2.76.1-3.0.4",
37
- "@girs/gjs": "^3.0.4",
38
- "@girs/glib-2.0": "^2.76.1-3.0.4",
39
- "@girs/gobject-2.0": "^2.76.1-3.0.4",
40
- "@girs/icalglib-3.0": "^3.0.0-3.0.4",
41
- "@girs/json-1.0": "^1.7.1-3.0.4",
42
- "@girs/libxml2-2.0": "^2.0.0-3.0.4",
43
- "@girs/soup-3.0": "^3.4.2-3.0.4"
28
+ "@girs/camel-1.2": "^1.2.0-3.2.0",
29
+ "@girs/edataserver-1.2": "^1.2.0-3.2.0",
30
+ "@girs/gio-2.0": "^2.76.1-3.2.0",
31
+ "@girs/gjs": "^3.2.0",
32
+ "@girs/glib-2.0": "^2.76.1-3.2.0",
33
+ "@girs/gobject-2.0": "^2.76.1-3.2.0",
34
+ "@girs/icalglib-3.0": "^3.0.0-3.2.0",
35
+ "@girs/json-1.0": "^1.7.1-3.2.0",
36
+ "@girs/libxml2-2.0": "^2.0.0-3.2.0",
37
+ "@girs/soup-3.0": "^3.4.2-3.2.0"
44
38
  },
45
39
  "devDependencies": {
46
40
  "typescript": "*"
@@ -3,6 +3,8 @@
3
3
  // General settings for code interpretation
4
4
  "target": "ESNext",
5
5
  "module": "ESNext",
6
+ "lib": ["ESNext"],
7
+ "types": [],
6
8
  "experimentalDecorators": true,
7
9
  "moduleResolution": "node",
8
10
  "noEmit": true,
package/typedoc.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "entryPoints": ["./ecal-2.0.d.ts","./ecal-2.0-ambient.d.ts","./ecal-2.0-import.d.ts"],
3
+ "readme": "./README.md",
4
+ "name": "ECal-2.0",
5
+ "tsconfig": "./tsconfig.json"
6
+ }
7
+