@37signals/basecamp 0.6.0 → 0.7.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/dist/client.d.ts +16 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +25 -1
- package/dist/client.js.map +1 -1
- package/dist/generated/metadata.json +319 -1
- package/dist/generated/openapi-stripped.json +5073 -1916
- package/dist/generated/path-mapping.d.ts.map +1 -1
- package/dist/generated/path-mapping.js +26 -2
- package/dist/generated/path-mapping.js.map +1 -1
- package/dist/generated/path-mapping.ts +27 -3
- package/dist/generated/schema.d.ts +2268 -150
- package/dist/generated/services/account.d.ts +66 -0
- package/dist/generated/services/account.d.ts.map +1 -0
- package/dist/generated/services/account.js +101 -0
- package/dist/generated/services/account.js.map +1 -0
- package/dist/generated/services/account.ts +144 -0
- package/dist/generated/services/campfires.d.ts +14 -0
- package/dist/generated/services/campfires.d.ts.map +1 -1
- package/dist/generated/services/campfires.js +8 -0
- package/dist/generated/services/campfires.js.map +1 -1
- package/dist/generated/services/campfires.ts +16 -0
- package/dist/generated/services/cards.d.ts +2 -0
- package/dist/generated/services/cards.d.ts.map +1 -1
- package/dist/generated/services/cards.js +1 -0
- package/dist/generated/services/cards.js.map +1 -1
- package/dist/generated/services/cards.ts +3 -0
- package/dist/generated/services/client-approvals.d.ts +7 -0
- package/dist/generated/services/client-approvals.d.ts.map +1 -1
- package/dist/generated/services/client-approvals.js +8 -1
- package/dist/generated/services/client-approvals.js.map +1 -1
- package/dist/generated/services/client-approvals.ts +10 -0
- package/dist/generated/services/client-correspondences.d.ts +7 -0
- package/dist/generated/services/client-correspondences.d.ts.map +1 -1
- package/dist/generated/services/client-correspondences.js +8 -1
- package/dist/generated/services/client-correspondences.js.map +1 -1
- package/dist/generated/services/client-correspondences.ts +10 -0
- package/dist/generated/services/forwards.d.ts +7 -0
- package/dist/generated/services/forwards.d.ts.map +1 -1
- package/dist/generated/services/forwards.js +4 -0
- package/dist/generated/services/forwards.js.map +1 -1
- package/dist/generated/services/forwards.ts +8 -0
- package/dist/generated/services/gauges.d.ts +140 -0
- package/dist/generated/services/gauges.d.ts.map +1 -0
- package/dist/generated/services/gauges.js +207 -0
- package/dist/generated/services/gauges.js.map +1 -0
- package/dist/generated/services/gauges.ts +298 -0
- package/dist/generated/services/hill-charts.d.ts +47 -0
- package/dist/generated/services/hill-charts.d.ts.map +1 -0
- package/dist/generated/services/hill-charts.js +70 -0
- package/dist/generated/services/hill-charts.js.map +1 -0
- package/dist/generated/services/hill-charts.ts +99 -0
- package/dist/generated/services/index.d.ts +5 -0
- package/dist/generated/services/index.d.ts.map +1 -1
- package/dist/generated/services/index.js +5 -0
- package/dist/generated/services/index.js.map +1 -1
- package/dist/generated/services/index.ts +5 -0
- package/dist/generated/services/my-assignments.d.ts +52 -0
- package/dist/generated/services/my-assignments.d.ts.map +1 -0
- package/dist/generated/services/my-assignments.js +74 -0
- package/dist/generated/services/my-assignments.js.map +1 -0
- package/dist/generated/services/my-assignments.ts +109 -0
- package/dist/generated/services/my-notifications.d.ts +50 -0
- package/dist/generated/services/my-notifications.d.ts.map +1 -0
- package/dist/generated/services/my-notifications.js +65 -0
- package/dist/generated/services/my-notifications.js.map +1 -0
- package/dist/generated/services/my-notifications.ts +100 -0
- package/dist/generated/services/people.d.ts +105 -0
- package/dist/generated/services/people.d.ts.map +1 -1
- package/dist/generated/services/people.js +156 -0
- package/dist/generated/services/people.js.map +1 -1
- package/dist/generated/services/people.ts +225 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/services/base.d.ts +19 -1
- package/dist/services/base.d.ts.map +1 -1
- package/dist/services/base.js +110 -1
- package/dist/services/base.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/metadata.json +319 -1
- package/src/generated/openapi-stripped.json +5073 -1916
- package/src/generated/path-mapping.ts +27 -3
- package/src/generated/schema.d.ts +2268 -150
- package/src/generated/services/account.ts +144 -0
- package/src/generated/services/campfires.ts +16 -0
- package/src/generated/services/cards.ts +3 -0
- package/src/generated/services/client-approvals.ts +10 -0
- package/src/generated/services/client-correspondences.ts +10 -0
- package/src/generated/services/forwards.ts +8 -0
- package/src/generated/services/gauges.ts +298 -0
- package/src/generated/services/hill-charts.ts +99 -0
- package/src/generated/services/index.ts +5 -0
- package/src/generated/services/my-assignments.ts +109 -0
- package/src/generated/services/my-notifications.ts +100 -0
- package/src/generated/services/people.ts +225 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-assignments.d.ts","sourceRoot":"","sources":["../../../src/generated/services/my-assignments.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAO/C;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;kDAC8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IAEnD;;;;;;;;OAQG;IACG,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAAC,CAAC;IAexF;;;;;;;;OAQG;IACG,sBAAsB,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,0CAA0C,CAAC,CAAC;IAe1G;;;;;;;;;OASG;IACG,gBAAgB,CAAC,OAAO,CAAC,EAAE,mCAAmC,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,oCAAoC,CAAC,CAAC;CAiB5I"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyAssignments service for the Basecamp API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
*/
|
|
6
|
+
import { BaseService } from "../../services/base.js";
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// Service
|
|
9
|
+
// =============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Service for MyAssignments operations.
|
|
12
|
+
*/
|
|
13
|
+
export class MyAssignmentsService extends BaseService {
|
|
14
|
+
/**
|
|
15
|
+
* Get the current user's active assignments grouped into priorities and non_priorities.
|
|
16
|
+
* @returns The my_assignment
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const result = await client.myAssignments.myAssignments();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
async myAssignments() {
|
|
24
|
+
const response = await this.request({
|
|
25
|
+
service: "MyAssignments",
|
|
26
|
+
operation: "GetMyAssignments",
|
|
27
|
+
resourceType: "my_assignment",
|
|
28
|
+
isMutation: false,
|
|
29
|
+
}, () => this.client.GET("/my/assignments.json", {}));
|
|
30
|
+
return response;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the current user's completed assignments.
|
|
34
|
+
* @returns Array of results
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const result = await client.myAssignments.myCompletedAssignments();
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
async myCompletedAssignments() {
|
|
42
|
+
const response = await this.request({
|
|
43
|
+
service: "MyAssignments",
|
|
44
|
+
operation: "GetMyCompletedAssignments",
|
|
45
|
+
resourceType: "my_completed_assignment",
|
|
46
|
+
isMutation: false,
|
|
47
|
+
}, () => this.client.GET("/my/assignments/completed.json", {}));
|
|
48
|
+
return response ?? [];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the current user's assignments filtered by due date scope.
|
|
52
|
+
* @param options - Optional query parameters
|
|
53
|
+
* @returns Array of results
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const result = await client.myAssignments.myDueAssignments();
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
async myDueAssignments(options) {
|
|
61
|
+
const response = await this.request({
|
|
62
|
+
service: "MyAssignments",
|
|
63
|
+
operation: "GetMyDueAssignments",
|
|
64
|
+
resourceType: "my_due_assignment",
|
|
65
|
+
isMutation: false,
|
|
66
|
+
}, () => this.client.GET("/my/assignments/due.json", {
|
|
67
|
+
params: {
|
|
68
|
+
query: { scope: options?.scope },
|
|
69
|
+
},
|
|
70
|
+
}));
|
|
71
|
+
return response ?? [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=my-assignments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-assignments.js","sourceRoot":"","sources":["../../../src/generated/services/my-assignments.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAkBrD,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAEnD;;;;;;;;OAQG;IACH,KAAK,CAAC,aAAa;QACjB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,OAAO,EAAE,eAAe;YACxB,SAAS,EAAE,kBAAkB;YAC7B,YAAY,EAAE,eAAe;YAC7B,UAAU,EAAE,KAAK;SAClB,EACD,GAAG,EAAE,CACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,sBAAsB,EAAE,EACvC,CAAC,CACL,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,sBAAsB;QAC1B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,OAAO,EAAE,eAAe;YACxB,SAAS,EAAE,2BAA2B;YACtC,YAAY,EAAE,yBAAyB;YACvC,UAAU,EAAE,KAAK;SAClB,EACD,GAAG,EAAE,CACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,gCAAgC,EAAE,EACjD,CAAC,CACL,CAAC;QACF,OAAO,QAAQ,IAAI,EAAE,CAAC;IACxB,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,gBAAgB,CAAC,OAA6C;QAClE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,OAAO,EAAE,eAAe;YACxB,SAAS,EAAE,qBAAqB;YAChC,YAAY,EAAE,mBAAmB;YACjC,UAAU,EAAE,KAAK;SAClB,EACD,GAAG,EAAE,CACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,0BAA0B,EAAE;YAC1C,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF,CAAC,CACL,CAAC;QACF,OAAO,QAAQ,IAAI,EAAE,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyAssignments service for the Basecamp API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { BaseService } from "../../services/base.js";
|
|
8
|
+
import type { components } from "../schema.js";
|
|
9
|
+
|
|
10
|
+
// =============================================================================
|
|
11
|
+
// Types
|
|
12
|
+
// =============================================================================
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Options for myDueAssignments.
|
|
17
|
+
*/
|
|
18
|
+
export interface MyDueAssignmentsMyAssignmentOptions {
|
|
19
|
+
/** Filter by due date range: overdue, due_today, due_tomorrow,
|
|
20
|
+
due_later_this_week, due_next_week, due_later */
|
|
21
|
+
scope?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
// =============================================================================
|
|
26
|
+
// Service
|
|
27
|
+
// =============================================================================
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Service for MyAssignments operations.
|
|
31
|
+
*/
|
|
32
|
+
export class MyAssignmentsService extends BaseService {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get the current user's active assignments grouped into priorities and non_priorities.
|
|
36
|
+
* @returns The my_assignment
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const result = await client.myAssignments.myAssignments();
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
async myAssignments(): Promise<components["schemas"]["GetMyAssignmentsResponseContent"]> {
|
|
44
|
+
const response = await this.request(
|
|
45
|
+
{
|
|
46
|
+
service: "MyAssignments",
|
|
47
|
+
operation: "GetMyAssignments",
|
|
48
|
+
resourceType: "my_assignment",
|
|
49
|
+
isMutation: false,
|
|
50
|
+
},
|
|
51
|
+
() =>
|
|
52
|
+
this.client.GET("/my/assignments.json", {
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Get the current user's completed assignments.
|
|
60
|
+
* @returns Array of results
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const result = await client.myAssignments.myCompletedAssignments();
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
async myCompletedAssignments(): Promise<components["schemas"]["GetMyCompletedAssignmentsResponseContent"]> {
|
|
68
|
+
const response = await this.request(
|
|
69
|
+
{
|
|
70
|
+
service: "MyAssignments",
|
|
71
|
+
operation: "GetMyCompletedAssignments",
|
|
72
|
+
resourceType: "my_completed_assignment",
|
|
73
|
+
isMutation: false,
|
|
74
|
+
},
|
|
75
|
+
() =>
|
|
76
|
+
this.client.GET("/my/assignments/completed.json", {
|
|
77
|
+
})
|
|
78
|
+
);
|
|
79
|
+
return response ?? [];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get the current user's assignments filtered by due date scope.
|
|
84
|
+
* @param options - Optional query parameters
|
|
85
|
+
* @returns Array of results
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const result = await client.myAssignments.myDueAssignments();
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
async myDueAssignments(options?: MyDueAssignmentsMyAssignmentOptions): Promise<components["schemas"]["GetMyDueAssignmentsResponseContent"]> {
|
|
93
|
+
const response = await this.request(
|
|
94
|
+
{
|
|
95
|
+
service: "MyAssignments",
|
|
96
|
+
operation: "GetMyDueAssignments",
|
|
97
|
+
resourceType: "my_due_assignment",
|
|
98
|
+
isMutation: false,
|
|
99
|
+
},
|
|
100
|
+
() =>
|
|
101
|
+
this.client.GET("/my/assignments/due.json", {
|
|
102
|
+
params: {
|
|
103
|
+
query: { scope: options?.scope },
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
);
|
|
107
|
+
return response ?? [];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyNotifications service for the Basecamp API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
*/
|
|
6
|
+
import { BaseService } from "../../services/base.js";
|
|
7
|
+
import type { components } from "../schema.js";
|
|
8
|
+
/**
|
|
9
|
+
* Options for myNotifications.
|
|
10
|
+
*/
|
|
11
|
+
export interface MyNotificationsMyNotificationOptions {
|
|
12
|
+
/** Page number for paginating through read items. Defaults to 1. */
|
|
13
|
+
page?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Request parameters for markAsRead.
|
|
17
|
+
*/
|
|
18
|
+
export interface MarkAsReadMyNotificationRequest {
|
|
19
|
+
/** Array of readable_sgid values identifying the items to mark as read */
|
|
20
|
+
readables: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Service for MyNotifications operations.
|
|
24
|
+
*/
|
|
25
|
+
export declare class MyNotificationsService extends BaseService {
|
|
26
|
+
/**
|
|
27
|
+
* Get the current user's notification inbox (the "Hey!" menu).
|
|
28
|
+
* @param options - Optional query parameters
|
|
29
|
+
* @returns The my_notification
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const result = await client.myNotifications.myNotifications();
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
myNotifications(options?: MyNotificationsMyNotificationOptions): Promise<components["schemas"]["GetMyNotificationsResponseContent"]>;
|
|
37
|
+
/**
|
|
38
|
+
* Mark specified items as read
|
|
39
|
+
* @param req - Resource request parameters
|
|
40
|
+
* @returns void
|
|
41
|
+
* @throws {BasecampError} If the request fails
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* await client.myNotifications.markAsRead({ readables: [1234] });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
markAsRead(req: MarkAsReadMyNotificationRequest): Promise<void>;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=my-notifications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-notifications.d.ts","sourceRoot":"","sources":["../../../src/generated/services/my-notifications.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAQ/C;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C,0EAA0E;IAC1E,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAOD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IAErD;;;;;;;;;OASG;IACG,eAAe,CAAC,OAAO,CAAC,EAAE,oCAAoC,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,mCAAmC,CAAC,CAAC;IAkB1I;;;;;;;;;;OAUG;IACG,UAAU,CAAC,GAAG,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;CAmBtE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyNotifications service for the Basecamp API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
*/
|
|
6
|
+
import { BaseService } from "../../services/base.js";
|
|
7
|
+
import { Errors } from "../../errors.js";
|
|
8
|
+
// =============================================================================
|
|
9
|
+
// Service
|
|
10
|
+
// =============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Service for MyNotifications operations.
|
|
13
|
+
*/
|
|
14
|
+
export class MyNotificationsService extends BaseService {
|
|
15
|
+
/**
|
|
16
|
+
* Get the current user's notification inbox (the "Hey!" menu).
|
|
17
|
+
* @param options - Optional query parameters
|
|
18
|
+
* @returns The my_notification
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const result = await client.myNotifications.myNotifications();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
async myNotifications(options) {
|
|
26
|
+
const response = await this.request({
|
|
27
|
+
service: "MyNotifications",
|
|
28
|
+
operation: "GetMyNotifications",
|
|
29
|
+
resourceType: "my_notification",
|
|
30
|
+
isMutation: false,
|
|
31
|
+
}, () => this.client.GET("/my/readings.json", {
|
|
32
|
+
params: {
|
|
33
|
+
query: { page: options?.page },
|
|
34
|
+
},
|
|
35
|
+
}));
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Mark specified items as read
|
|
40
|
+
* @param req - Resource request parameters
|
|
41
|
+
* @returns void
|
|
42
|
+
* @throws {BasecampError} If the request fails
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* await client.myNotifications.markAsRead({ readables: [1234] });
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
async markAsRead(req) {
|
|
50
|
+
if (!req.readables) {
|
|
51
|
+
throw Errors.validation("Readables is required");
|
|
52
|
+
}
|
|
53
|
+
await this.request({
|
|
54
|
+
service: "MyNotifications",
|
|
55
|
+
operation: "MarkAsRead",
|
|
56
|
+
resourceType: "resource",
|
|
57
|
+
isMutation: true,
|
|
58
|
+
}, () => this.client.PUT("/my/unreads.json", {
|
|
59
|
+
body: {
|
|
60
|
+
readables: req.readables,
|
|
61
|
+
},
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=my-notifications.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"my-notifications.js","sourceRoot":"","sources":["../../../src/generated/services/my-notifications.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAwBzC,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IAErD;;;;;;;;;OASG;IACH,KAAK,CAAC,eAAe,CAAC,OAA8C;QAClE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CACjC;YACE,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE,oBAAoB;YAC/B,YAAY,EAAE,iBAAiB;YAC/B,UAAU,EAAE,KAAK;SAClB,EACD,GAAG,EAAE,CACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE;YACnC,MAAM,EAAE;gBACN,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;aAC/B;SACF,CAAC,CACL,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,UAAU,CAAC,GAAoC;QACnD,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;YACnB,MAAM,MAAM,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC;QACnD,CAAC;QACD,MAAM,IAAI,CAAC,OAAO,CAChB;YACE,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE,YAAY;YACvB,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,IAAI;SACjB,EACD,GAAG,EAAE,CACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,EAAE;YAClC,IAAI,EAAE;gBACJ,SAAS,EAAE,GAAG,CAAC,SAAS;aACzB;SACF,CAAC,CACL,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MyNotifications service for the Basecamp API.
|
|
3
|
+
*
|
|
4
|
+
* @generated from OpenAPI spec - do not edit directly
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { BaseService } from "../../services/base.js";
|
|
8
|
+
import type { components } from "../schema.js";
|
|
9
|
+
import { Errors } from "../../errors.js";
|
|
10
|
+
|
|
11
|
+
// =============================================================================
|
|
12
|
+
// Types
|
|
13
|
+
// =============================================================================
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Options for myNotifications.
|
|
18
|
+
*/
|
|
19
|
+
export interface MyNotificationsMyNotificationOptions {
|
|
20
|
+
/** Page number for paginating through read items. Defaults to 1. */
|
|
21
|
+
page?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Request parameters for markAsRead.
|
|
26
|
+
*/
|
|
27
|
+
export interface MarkAsReadMyNotificationRequest {
|
|
28
|
+
/** Array of readable_sgid values identifying the items to mark as read */
|
|
29
|
+
readables: string[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
// =============================================================================
|
|
34
|
+
// Service
|
|
35
|
+
// =============================================================================
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Service for MyNotifications operations.
|
|
39
|
+
*/
|
|
40
|
+
export class MyNotificationsService extends BaseService {
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Get the current user's notification inbox (the "Hey!" menu).
|
|
44
|
+
* @param options - Optional query parameters
|
|
45
|
+
* @returns The my_notification
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const result = await client.myNotifications.myNotifications();
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
async myNotifications(options?: MyNotificationsMyNotificationOptions): Promise<components["schemas"]["GetMyNotificationsResponseContent"]> {
|
|
53
|
+
const response = await this.request(
|
|
54
|
+
{
|
|
55
|
+
service: "MyNotifications",
|
|
56
|
+
operation: "GetMyNotifications",
|
|
57
|
+
resourceType: "my_notification",
|
|
58
|
+
isMutation: false,
|
|
59
|
+
},
|
|
60
|
+
() =>
|
|
61
|
+
this.client.GET("/my/readings.json", {
|
|
62
|
+
params: {
|
|
63
|
+
query: { page: options?.page },
|
|
64
|
+
},
|
|
65
|
+
})
|
|
66
|
+
);
|
|
67
|
+
return response;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Mark specified items as read
|
|
72
|
+
* @param req - Resource request parameters
|
|
73
|
+
* @returns void
|
|
74
|
+
* @throws {BasecampError} If the request fails
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* await client.myNotifications.markAsRead({ readables: [1234] });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
async markAsRead(req: MarkAsReadMyNotificationRequest): Promise<void> {
|
|
82
|
+
if (!req.readables) {
|
|
83
|
+
throw Errors.validation("Readables is required");
|
|
84
|
+
}
|
|
85
|
+
await this.request(
|
|
86
|
+
{
|
|
87
|
+
service: "MyNotifications",
|
|
88
|
+
operation: "MarkAsRead",
|
|
89
|
+
resourceType: "resource",
|
|
90
|
+
isMutation: true,
|
|
91
|
+
},
|
|
92
|
+
() =>
|
|
93
|
+
this.client.PUT("/my/unreads.json", {
|
|
94
|
+
body: {
|
|
95
|
+
readables: req.readables,
|
|
96
|
+
},
|
|
97
|
+
})
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -14,11 +14,46 @@ export type Person = components["schemas"]["Person"];
|
|
|
14
14
|
*/
|
|
15
15
|
export interface ListPingablePeopleOptions extends PaginationOptions {
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Request parameters for updateMyPreferences.
|
|
19
|
+
*/
|
|
20
|
+
export interface UpdateMyPreferencesPeopleRequest {
|
|
21
|
+
/** Person */
|
|
22
|
+
person: components["schemas"]["PreferencesPayload"];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Request parameters for updateMyProfile.
|
|
26
|
+
*/
|
|
27
|
+
export interface UpdateMyProfilePeopleRequest {
|
|
28
|
+
/** Display name */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** Email address */
|
|
31
|
+
emailAddress?: string;
|
|
32
|
+
/** Title */
|
|
33
|
+
title?: string;
|
|
34
|
+
/** Bio */
|
|
35
|
+
bio?: string;
|
|
36
|
+
/** Location */
|
|
37
|
+
location?: string;
|
|
38
|
+
/** Time zone name */
|
|
39
|
+
timeZoneName?: string;
|
|
40
|
+
/** First week day */
|
|
41
|
+
firstWeekDay?: components["schemas"]["FirstWeekDay"];
|
|
42
|
+
/** Time format */
|
|
43
|
+
timeFormat?: string;
|
|
44
|
+
}
|
|
17
45
|
/**
|
|
18
46
|
* Options for list.
|
|
19
47
|
*/
|
|
20
48
|
export interface ListPeopleOptions extends PaginationOptions {
|
|
21
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Request parameters for enableOutOfOffice.
|
|
52
|
+
*/
|
|
53
|
+
export interface EnableOutOfOfficePeopleRequest {
|
|
54
|
+
/** Out of office */
|
|
55
|
+
outOfOffice: components["schemas"]["OutOfOfficePayload"];
|
|
56
|
+
}
|
|
22
57
|
/**
|
|
23
58
|
* Options for listForProject.
|
|
24
59
|
*/
|
|
@@ -50,6 +85,28 @@ export declare class PeopleService extends BaseService {
|
|
|
50
85
|
* ```
|
|
51
86
|
*/
|
|
52
87
|
listPingable(options?: ListPingablePeopleOptions): Promise<ListResult<Person>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get the current user's preferences
|
|
90
|
+
* @returns The my_preference
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const result = await client.people.myPreferences();
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
myPreferences(): Promise<components["schemas"]["GetMyPreferencesResponseContent"]>;
|
|
98
|
+
/**
|
|
99
|
+
* Update the current user's preferences
|
|
100
|
+
* @param req - My_preference update parameters
|
|
101
|
+
* @returns The my_preference
|
|
102
|
+
* @throws {BasecampError} If the resource is not found or fields are invalid
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* ```ts
|
|
106
|
+
* const result = await client.people.updateMyPreferences({ person: "example" });
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
updateMyPreferences(req: UpdateMyPreferencesPeopleRequest): Promise<components["schemas"]["UpdateMyPreferencesResponseContent"]>;
|
|
53
110
|
/**
|
|
54
111
|
* Get the current authenticated user's profile
|
|
55
112
|
* @returns The Person
|
|
@@ -60,6 +117,18 @@ export declare class PeopleService extends BaseService {
|
|
|
60
117
|
* ```
|
|
61
118
|
*/
|
|
62
119
|
me(): Promise<Person>;
|
|
120
|
+
/**
|
|
121
|
+
* Update the current authenticated user's profile
|
|
122
|
+
* @param req - My_profile update parameters
|
|
123
|
+
* @returns void
|
|
124
|
+
* @throws {BasecampError} If the resource is not found or fields are invalid
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* await client.people.updateMyProfile({ });
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
updateMyProfile(req: UpdateMyProfilePeopleRequest): Promise<void>;
|
|
63
132
|
/**
|
|
64
133
|
* List all people visible to the current user
|
|
65
134
|
* @param options - Optional query parameters
|
|
@@ -83,6 +152,42 @@ export declare class PeopleService extends BaseService {
|
|
|
83
152
|
* ```
|
|
84
153
|
*/
|
|
85
154
|
get(personId: number): Promise<Person>;
|
|
155
|
+
/**
|
|
156
|
+
* Get the out of office status for a person
|
|
157
|
+
* @param personId - The person ID
|
|
158
|
+
* @returns The out_of_office
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const result = await client.people.outOfOffice(123);
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
outOfOffice(personId: number): Promise<components["schemas"]["GetOutOfOfficeResponseContent"]>;
|
|
166
|
+
/**
|
|
167
|
+
* Enable or replace out of office for a person.
|
|
168
|
+
* @param personId - The person ID
|
|
169
|
+
* @param req - Out_of_office request parameters
|
|
170
|
+
* @returns The out_of_office
|
|
171
|
+
* @throws {BasecampError} If the request fails
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```ts
|
|
175
|
+
* const result = await client.people.enableOutOfOffice(123, { outOfOffice: "example" });
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
enableOutOfOffice(personId: number, req: EnableOutOfOfficePeopleRequest): Promise<components["schemas"]["EnableOutOfOfficeResponseContent"]>;
|
|
179
|
+
/**
|
|
180
|
+
* Disable out of office for a person.
|
|
181
|
+
* @param personId - The person ID
|
|
182
|
+
* @returns void
|
|
183
|
+
* @throws {BasecampError} If the request fails
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* await client.people.disableOutOfOffice(123);
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
disableOutOfOffice(personId: number): Promise<void>;
|
|
86
191
|
/**
|
|
87
192
|
* List all active people on a project
|
|
88
193
|
* @param projectId - The project ID
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../../src/generated/services/people.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../../src/generated/services/people.ts"],"names":[],"mappings":"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"}
|