@vtecx/vtecxnext 2.2.0 → 2.2.1

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.
@@ -876,6 +876,13 @@ export declare class VtecxNext {
876
876
  * @return message feed
877
877
  */
878
878
  createGroupadmin: (createGroupadminInfos: CreateGroupadminInfo[]) => Promise<any>;
879
+ /**
880
+ * delete group admin group
881
+ * @param groupNames group name list
882
+ * @param async execute async
883
+ * @return message feed
884
+ */
885
+ deleteGroupadmin: (groupNames: string[], async?: boolean) => Promise<any>;
879
886
  /**
880
887
  * vte.cxへリクエスト
881
888
  * @param method メソッド
package/dist/vtecxnext.js CHANGED
@@ -3505,6 +3505,41 @@ class VtecxNext {
3505
3505
  await checkVtecxResponse(response);
3506
3506
  return await getJson(response);
3507
3507
  };
3508
+ /**
3509
+ * delete group admin group
3510
+ * @param groupNames group name list
3511
+ * @param async execute async
3512
+ * @return message feed
3513
+ */
3514
+ deleteGroupadmin = async (groupNames, async) => {
3515
+ //console.log(`[vtecxnext deleteGroupadmin] start. feed=${feed}`)
3516
+ // 入力チェック
3517
+ checkNotNull(groupNames, 'group name');
3518
+ const feed = [];
3519
+ for (const groupName of groupNames) {
3520
+ checkNotNull(groupName, 'group name');
3521
+ checkContainSlash(groupName, 'group name');
3522
+ const links = [{ '___rel': 'self', '___href': `/_group/${groupName}` }];
3523
+ const entry = { 'link': links };
3524
+ feed.push(entry);
3525
+ }
3526
+ // vte.cxへリクエスト
3527
+ const method = 'DELETE';
3528
+ const url = `${SERVLETPATH_DATA}/?_deletegroupadmin${async ? '&_async' : ''}`;
3529
+ let response;
3530
+ try {
3531
+ response = await this.requestVtecx(method, url, JSON.stringify(feed));
3532
+ }
3533
+ catch (e) {
3534
+ throw newFetchError(e, true);
3535
+ }
3536
+ //console.log(`[vtecxnext deleteGroupadmin] response. status=${response.status}`)
3537
+ // vte.cxからのset-cookieを転記
3538
+ this.setCookie(response);
3539
+ // レスポンスのエラーチェック
3540
+ await checkVtecxResponse(response);
3541
+ return await getJson(response);
3542
+ };
3508
3543
  //----------------------
3509
3544
  /**
3510
3545
  * vte.cxへリクエスト
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtecx/vtecxnext",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "vte.cx Next.js api",
5
5
  "main": "dist/index.js",
6
6
  "files": [