@konomi-app/kintone-utilities 5.15.0 → 5.16.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/cybozu-api/index.d.ts +2 -1
- package/dist/cybozu-api/index.js +2 -1
- package/dist/cybozu-api/index.js.map +1 -1
- package/dist/cybozu-api/organization.d.ts +62 -0
- package/dist/cybozu-api/organization.js +68 -0
- package/dist/cybozu-api/organization.js.map +1 -0
- package/dist/cybozu-api/user.d.ts +0 -3
- package/dist/cybozu-api/user.js +0 -3
- package/dist/cybozu-api/user.js.map +1 -1
- package/package.json +1 -1
package/dist/cybozu-api/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cybozu-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cybozu-api/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cybozu組織情報を取得します。
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* このメソッドは、Cybozuのorganizations APIエンドポイントにGETリクエストを送信し、
|
|
6
|
+
* 組織の一覧を取得します。
|
|
7
|
+
*
|
|
8
|
+
* @returns {Promise<{ organizations: cybozu.api.Organization[] }>}
|
|
9
|
+
* 組織情報の配列を含むPromiseオブジェクト
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // 組織情報を取得する例
|
|
14
|
+
* const result = await getCybozuOrganizations();
|
|
15
|
+
* console.log(result.organizations); // Organization[]
|
|
16
|
+
*
|
|
17
|
+
* // エラーハンドリングを含む例
|
|
18
|
+
* try {
|
|
19
|
+
* const { organizations } = await getCybozuOrganizations();
|
|
20
|
+
* organizations.forEach(org => {
|
|
21
|
+
* console.log(`組織名: ${org.name}, ID: ${org.id}`);
|
|
22
|
+
* });
|
|
23
|
+
* } catch (error) {
|
|
24
|
+
* console.error('組織情報の取得に失敗しました:', error);
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @throws {Error} APIリクエストが失敗した場合
|
|
29
|
+
*
|
|
30
|
+
* @since 1.0.0
|
|
31
|
+
*/
|
|
32
|
+
export declare function getCybozuOrganizations(): Promise<{
|
|
33
|
+
organizations: cybozu.api.Organization[];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* サイボウズ組織のユーザー一覧を取得します。
|
|
37
|
+
*
|
|
38
|
+
* 指定された組織コードに所属するユーザーの情報を取得するためのAPIを呼び出します。
|
|
39
|
+
*
|
|
40
|
+
* @param organizationCode - 取得対象の組織コード
|
|
41
|
+
* @returns ユーザー一覧を含むPromiseオブジェクト
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* // 組織コード "sales" のユーザー一覧を取得
|
|
46
|
+
* const result = await getCybozuOrganizationUsers("sales");
|
|
47
|
+
* console.log(result.users); // User[]
|
|
48
|
+
*
|
|
49
|
+
* // エラーハンドリングを含む使用例
|
|
50
|
+
* try {
|
|
51
|
+
* const { users } = await getCybozuOrganizationUsers("development");
|
|
52
|
+
* users.forEach(user => {
|
|
53
|
+
* console.log(`ユーザー名: ${user.name}, ID: ${user.id}`);
|
|
54
|
+
* });
|
|
55
|
+
* } catch (error) {
|
|
56
|
+
* console.error("ユーザー取得に失敗しました:", error);
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function getCybozuOrganizationUsers(organizationCode: string): Promise<{
|
|
61
|
+
users: cybozu.api.User[];
|
|
62
|
+
}>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { api } from './common';
|
|
2
|
+
/**
|
|
3
|
+
* Cybozu組織情報を取得します。
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* このメソッドは、Cybozuのorganizations APIエンドポイントにGETリクエストを送信し、
|
|
7
|
+
* 組織の一覧を取得します。
|
|
8
|
+
*
|
|
9
|
+
* @returns {Promise<{ organizations: cybozu.api.Organization[] }>}
|
|
10
|
+
* 組織情報の配列を含むPromiseオブジェクト
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // 組織情報を取得する例
|
|
15
|
+
* const result = await getCybozuOrganizations();
|
|
16
|
+
* console.log(result.organizations); // Organization[]
|
|
17
|
+
*
|
|
18
|
+
* // エラーハンドリングを含む例
|
|
19
|
+
* try {
|
|
20
|
+
* const { organizations } = await getCybozuOrganizations();
|
|
21
|
+
* organizations.forEach(org => {
|
|
22
|
+
* console.log(`組織名: ${org.name}, ID: ${org.id}`);
|
|
23
|
+
* });
|
|
24
|
+
* } catch (error) {
|
|
25
|
+
* console.error('組織情報の取得に失敗しました:', error);
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @throws {Error} APIリクエストが失敗した場合
|
|
30
|
+
*
|
|
31
|
+
* @since 1.0.0
|
|
32
|
+
*/
|
|
33
|
+
export function getCybozuOrganizations() {
|
|
34
|
+
return api({ endpointName: 'organizations', method: 'GET', body: {} });
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* サイボウズ組織のユーザー一覧を取得します。
|
|
38
|
+
*
|
|
39
|
+
* 指定された組織コードに所属するユーザーの情報を取得するためのAPIを呼び出します。
|
|
40
|
+
*
|
|
41
|
+
* @param organizationCode - 取得対象の組織コード
|
|
42
|
+
* @returns ユーザー一覧を含むPromiseオブジェクト
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* // 組織コード "sales" のユーザー一覧を取得
|
|
47
|
+
* const result = await getCybozuOrganizationUsers("sales");
|
|
48
|
+
* console.log(result.users); // User[]
|
|
49
|
+
*
|
|
50
|
+
* // エラーハンドリングを含む使用例
|
|
51
|
+
* try {
|
|
52
|
+
* const { users } = await getCybozuOrganizationUsers("development");
|
|
53
|
+
* users.forEach(user => {
|
|
54
|
+
* console.log(`ユーザー名: ${user.name}, ID: ${user.id}`);
|
|
55
|
+
* });
|
|
56
|
+
* } catch (error) {
|
|
57
|
+
* console.error("ユーザー取得に失敗しました:", error);
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export function getCybozuOrganizationUsers(organizationCode) {
|
|
62
|
+
return api({
|
|
63
|
+
endpointName: 'organization/users',
|
|
64
|
+
method: 'GET',
|
|
65
|
+
body: { code: organizationCode },
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=organization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../src/cybozu-api/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,sBAAsB;IACpC,OAAO,GAAG,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,0BAA0B,CACxC,gBAAwB;IAExB,OAAO,GAAG,CAAC;QACT,YAAY,EAAE,oBAAoB;QAClC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;KACjC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/cybozu-api/user.js
CHANGED
|
@@ -6,9 +6,6 @@ import { api } from './common';
|
|
|
6
6
|
export const getCybozuUsers = () => {
|
|
7
7
|
return api({ endpointName: 'users', method: 'GET', body: {} });
|
|
8
8
|
};
|
|
9
|
-
export const getCybozuOrganizations = () => {
|
|
10
|
-
return api({ endpointName: 'organizations', method: 'GET', body: {} });
|
|
11
|
-
};
|
|
12
9
|
/**
|
|
13
10
|
* ユーザーが所属するグループを返却します
|
|
14
11
|
* @param code ユーザーコード
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/cybozu-api/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAA0C,EAAE;IACxE,OAAO,GAAG,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/cybozu-api/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAA0C,EAAE;IACxE,OAAO,GAAG,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;AACjE,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAA2C,EAAE;IAC3F,OAAO,GAAG,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAAY,EAC2C,EAAE;IACzD,OAAO,GAAG,CAAC,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;AACpF,CAAC,CAAC"}
|