From 5baeb950c4fc5372452b32527708b4d9f2a4f0e0 Mon Sep 17 00:00:00 2001 From: Ryan Fleischmann Date: Tue, 6 Aug 2024 14:11:43 -0400 Subject: [PATCH] tinkering with abaplint again (#75) * tinkering with abaplint again * more abaplint tinkering * extending the workflow * revise the workflow * more wf refinement * restaging * let workflow complete regadless of lint output * hey more abaplint fixes --- .github/workflows/build.yml | 29 + abaplint.json | 12 +- src/zcl_prvd_baseline.clas.abap | 185 ++--- src/zcl_prvd_ident.clas.abap | 83 +- src/zcl_prvd_nchain.clas.abap | 129 ++- src/zcl_prvd_tenants_helper.clas.abap | 65 +- src/zcl_prvd_vault.clas.abap | 79 +- src/zcl_prvd_vault_helper.clas.abap | 106 +-- src/zif_prvd_baseline.intf.abap | 998 +++++++++++------------ src/zif_prvd_file.intf.abap | 10 +- src/zif_prvd_nchain.intf.abap | 29 +- src/zif_prvd_nchain_abi_upload.intf.abap | 47 -- src/zif_prvd_nchain_abi_upload.intf.xml | 15 - src/zif_prvd_nchain_network.intf.abap | 25 +- src/zif_prvd_object.intf.abap | 18 +- src/zif_prvd_privacy.intf.abap | 42 +- src/zif_prvd_tenants.intf.abap | 16 +- src/zif_prvd_unittests.intf.abap | 27 - src/zif_prvd_unittests.intf.xml | 15 - src/zif_prvd_vault.intf.abap | 24 +- 20 files changed, 914 insertions(+), 1040 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 src/zif_prvd_nchain_abi_upload.intf.abap delete mode 100644 src/zif_prvd_nchain_abi_upload.intf.xml delete mode 100644 src/zif_prvd_unittests.intf.abap delete mode 100644 src/zif_prvd_unittests.intf.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..2c6aa70 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: CI Build + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Startup confirmation + run: echo Starting provide-abap build + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install abaplint + run: npm install -g @abaplint/cli + + - name: Run abaplint and save output + run: abaplint -f json || true + + diff --git a/abaplint.json b/abaplint.json index 286004b..1748ba3 100644 --- a/abaplint.json +++ b/abaplint.json @@ -162,7 +162,7 @@ "ignoreLocal": true, "ignoreInterfaces": false, "statics": "^G._.+$", - "instance": "^M._.+$, ^MI._.+$, ^MV._.+$, ^MS._.+$, ^MO._.+$", + "instance": "^(M|MI|MV|MS|MO)._.+$", "constants": "" }, "classic_exceptions_overlap": { @@ -518,9 +518,9 @@ "patternKind": "required", "ignoreNames": [], "ignorePatterns": [], - "expectedData": "^L._.+$, ^LV._.+$, ^LS._.+$, ^LO._.+$, ^$", + "expectedData": "^(L|LV|LS|LO)._.+$", "expectedConstant": "^LC_.+$", - "expectedFS": "^$, ^$" + "expectedFS": "^<(L|FS)._.+>$" }, "main_file_contents": { "exclude": [], @@ -565,10 +565,10 @@ "ignoreNames": [], "ignorePatterns": [], "ignoreExceptions": true, - "importing": "^I._.+$, ^IV._.+$ ", + "importing": "^(I|IV)._.+$", "returning": "^R._.+$", "changing": "^C._.+$", - "exporting": "^E._.+$, ^EV._.+$, ^ES._.+$ " + "exporting": "^(E|EV)._.+$" }, "mix_returning": { "exclude": [], @@ -866,7 +866,7 @@ "types_naming": { "exclude": [], "severity": "Error", - "pattern": "^TY_.+$, ^TT_.+$, ^TTY_.+$, ^R_.+$" + "pattern": "^(TY|TT|TTY|R)_.+$" }, "uncaught_exception": { "exclude": [], diff --git a/src/zcl_prvd_baseline.clas.abap b/src/zcl_prvd_baseline.clas.abap index f2fc11b..8a23b16 100644 --- a/src/zcl_prvd_baseline.clas.abap +++ b/src/zcl_prvd_baseline.clas.abap @@ -2,7 +2,6 @@ CLASS zcl_prvd_baseline DEFINITION PUBLIC CREATE PUBLIC . -* Generated by abap-openapi-client * Baseline API, v1.0.0 PUBLIC SECTION. @@ -31,7 +30,7 @@ ENDCLASS. -CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. +CLASS zcl_prvd_baseline IMPLEMENTATION. METHOD constructor. @@ -96,7 +95,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -126,7 +125,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -162,7 +161,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -201,7 +200,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -240,11 +239,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful - " application/json,#/components/schemas/response_listusers + RETURN. WHEN 401. " todo, raise @@ -291,7 +289,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -330,10 +328,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. " application/json,#/components/schemas/response_listtokens WHEN 401. @@ -374,7 +372,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -413,7 +411,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -452,10 +450,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -479,7 +477,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -515,7 +513,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -557,7 +555,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -606,10 +604,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -650,7 +648,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " OK @@ -695,7 +693,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -734,7 +732,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " OK WHEN 401. @@ -767,7 +765,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -802,7 +800,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -835,7 +833,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/ProveRequest get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -846,8 +844,6 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. WHEN 404. " todo, raise WHEN 422. - " The API returns a 422 status code and human-readable error message(s) if (i) the witness parameters is not provided, (ii) required circuit arguments (i.e., fields) are not included within the given witness parameter or (iii) when Circui - "t constraints are not satisfied. " todo, raise WHEN 503. " todo, raise @@ -872,7 +868,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -902,7 +898,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1035,7 +1031,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Secret get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1063,7 +1059,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Token get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " Request successfully authorized a `Token` @@ -1093,7 +1089,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/UnsealVaultRequest get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. " The request was successful but did not return a response @@ -1124,7 +1120,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/BusinessObject get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1155,7 +1151,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Network get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. " The request was successful but did not return a response @@ -1186,10 +1182,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -1217,10 +1213,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Organization get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -1248,7 +1244,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/User get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1281,7 +1277,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Workgroup get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. " The request was successful but did not return a response @@ -1312,7 +1308,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/VerifyProofRequest get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1342,7 +1338,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1360,7 +1356,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. ENDMETHOD. - METHOD zif_prvd_baseline~associateworkgroupuser. + METHOD zif_prvd_baseline~associateworkgroupuser. DATA lv_code TYPE i. DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/workgroups/{id}/users'. @@ -1373,7 +1369,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/AssociateWorkgroupUserRequest get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1419,7 +1415,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. set_bearer_token( EXPORTING iv_tokenstring = body ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. "## Created " application/json,#/components/schemas/AuthenticationResponse @@ -1461,17 +1457,18 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. set_bearer_token( iv_tokenstring = body ). get_bearer_token( ). lv_code = send_receive( ). - ""WRITE / lv_code. ~ replace with logging call + " code = lv_code. CASE lv_code. WHEN 201. " Created lv_authresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = lv_authresponsestr CHANGING data = apiresponse ). - ASSIGN apiresponse->* TO FIELD-SYMBOL(). "dereference into field symbol + ASSIGN apiresponse->* TO FIELD-SYMBOL(). ASSIGN COMPONENT 'ACCESS_TOKEN' OF STRUCTURE TO . - ASSIGN ->* TO . - lv_bpiauthreq = . - "set_bpi_token( lv_bpiauthreq ). + IF sy-subrc = 0. + ASSIGN ->* TO . + lv_bpiauthreq = . + ENDIF. WHEN 401. " todo, raise authorization failure WHEN 404. @@ -1493,7 +1490,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Account get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new `Account` was created @@ -1541,7 +1538,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. CHANGING data = apiresponse ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 202. " Accepted @@ -1573,7 +1570,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Circuit get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. "# The request was successful WHEN 200. @@ -1601,7 +1598,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Connector get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. " The request was successful and a new entity was created WHEN 201. @@ -1631,7 +1628,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Key get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1659,7 +1656,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Network get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1686,10 +1683,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -1714,10 +1711,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Organization get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -1742,7 +1739,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Transaction get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1770,7 +1767,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/User get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " User created @@ -1791,7 +1788,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Vault get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1819,7 +1816,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Wallet get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -1847,7 +1844,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Workgroup get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -1882,7 +1879,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. WHEN 401. @@ -1911,7 +1908,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. " The request was successful but did not return a response. @@ -1934,10 +1931,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -1967,7 +1964,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 204. " The request was successful but did not return a response @@ -1997,7 +1994,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " Target `User` deleted @@ -2027,7 +2024,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -2055,7 +2052,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Contract get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -2093,7 +2090,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/Key get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 201. " The request was successful and a new entity was created @@ -2124,12 +2121,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. * todo, set body, #/components/schemas/ExecuteContractRequest get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 202. - " The request was successfully accepted and processing will complete\nasynchronously.\n\nThe API returns 202 Accepted if the contract execution will\nbroadcast a Transaction to the network and returns a ref, which is\nan identifier you ma - "y use to ask for the execution status of the\nTransaction.\napplication/json; charset=UTF-8:\n schema:\n $ref: '#/components/schemas/ExecuteContract'\n - " todo, raise + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2156,7 +2151,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " OK @@ -2183,7 +2178,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -2212,10 +2207,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2241,10 +2236,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2270,10 +2265,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2299,10 +2294,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2329,10 +2324,10 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. - " The request was successful. + RETURN. WHEN 401. " todo, raise WHEN 403. @@ -2362,7 +2357,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -2392,7 +2387,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful @@ -2422,7 +2417,7 @@ CLASS ZCL_PRVD_BASELINE IMPLEMENTATION. value = lv_uri ). get_bearer_token( ). lv_code = send_receive( ). - "WRITE / lv_code. ~ replace with logging call + CASE lv_code. WHEN 200. " The request was successful diff --git a/src/zcl_prvd_ident.clas.abap b/src/zcl_prvd_ident.clas.abap index 54aa41d..1377148 100644 --- a/src/zcl_prvd_ident.clas.abap +++ b/src/zcl_prvd_ident.clas.abap @@ -81,7 +81,6 @@ CLASS zcl_prvd_ident IMPLEMENTATION. ENDMETHOD. METHOD zif_prvd_ident~associateusertoapplication. - DATA lv_code TYPE i. DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications/{application_id}/users'. lv_temp = application_id. @@ -91,7 +90,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). * todo, set body, #/components/schemas/AssociateusertoapplicationRequest - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -107,7 +106,6 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~authentication. - DATA lv_code TYPE i. DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/authenticate'. DATA lv_basicauthdata TYPE REF TO data. @@ -122,7 +120,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_cdata( data = /ui2/cl_json=>serialize( data = lv_basicauthdata pretty_name = /ui2/cl_json=>pretty_mode-low_case ) ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ""TODO add logging call CASE lv_code. WHEN 201. @@ -136,7 +134,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~authorizelong_termtoken. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/tokens'. DATA: lv_longtermrequestdata TYPE REF TO data, @@ -162,7 +160,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_cdata( lv_requeststr ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). status = lv_code. CASE lv_code. @@ -181,7 +179,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~createapplication. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications'. mi_client->request->set_method( 'POST' ). @@ -190,7 +188,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = 'name' value = name ). * todo, set body, #/components/schemas/CreateapplicationRequest - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -206,7 +204,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~createorganization. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/organizations'. mi_client->request->set_method( 'POST' ). @@ -215,7 +213,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = 'name' value = name ). * todo, set body, #/components/schemas/CreateorganizationRequest - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -231,7 +229,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~createuser. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/users'. DATA lv_requestdata TYPE REF TO data. @@ -240,12 +238,12 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). zcl_prvd_api_helper=>copy_data_to_ref( EXPORTING is_data = body - CHANGING cr_data = lv_REQUESTDATA ). + CHANGING cr_data = lv_requestdata ). lv_requeststr = /ui2/cl_json=>serialize( data = lv_requestdata pretty_name = /ui2/cl_json=>pretty_mode-low_case ). mi_client->request->set_cdata( data = lv_requeststr ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -261,7 +259,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~deleteapplication. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications/{application_id}'. lv_temp = application_id. @@ -272,7 +270,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -288,7 +286,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~deleteuser. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/tokens/{user_id}'. lv_temp = user_id. @@ -299,7 +297,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -315,7 +313,6 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~getapplicationdetails. - DATA lv_code TYPE i. DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications/{application_id}'. lv_temp = application_id. @@ -326,7 +323,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -335,14 +332,14 @@ CLASS zcl_prvd_ident IMPLEMENTATION. CASE lv_code. WHEN 200. "Success - WHEN OTHERS. + WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. ENDMETHOD. METHOD zif_prvd_ident~getorganizationdetails. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/organizations/{organization_id}'. lv_temp = organization_id. @@ -355,7 +352,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = content_type ). mi_client->request->set_header_field( name = 'name' value = name ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -371,7 +368,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~getuserdetail. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/users/{user_id}'. lv_temp = user_id. @@ -384,7 +381,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = content_type ). mi_client->request->set_header_field( name = 'name' value = name ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -400,13 +397,13 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~listapplications. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications'. mi_client->request->set_method( 'GET' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -422,7 +419,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~listapplicationusers. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications/{application_id}/users'. lv_temp = application_id. @@ -433,7 +430,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -449,7 +446,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~listorganizations. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/organizations'. mi_client->request->set_method( 'GET' ). @@ -457,7 +454,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -473,7 +470,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~listtokens. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/tokens'. mi_client->request->set_method( 'GET' ). @@ -483,7 +480,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = content_type ). mi_client->request->set_header_field( name = 'name' value = name ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -498,7 +495,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. ENDMETHOD. METHOD zif_prvd_ident~listuserscopy. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/users'. mi_client->request->set_method( 'GET' ). @@ -506,7 +503,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -522,7 +519,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~refresh_access_token. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/api/v1/tokens'. DATA: lv_longtermrequestdata TYPE REF TO data, @@ -547,7 +544,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_cdata( data = lv_requeststr ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -567,7 +564,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~revoketoken. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/tokens/f2202ba1-e2af-4505-9b1a-53e1ce8de904'. mi_client->request->set_method( 'DELETE' ). @@ -575,7 +572,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. value = lv_uri ). mi_client->request->set_header_field( name = 'content-type' value = content_type ). - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -591,7 +588,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~updateapplication. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/applications/{application_id}'. lv_temp = application_id. @@ -603,7 +600,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = 'name' value = name ). * todo, set body, #/components/schemas/UpdateapplicationRequest - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). @@ -619,7 +616,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~updateorganizationdetails. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/organizations/{organization_id}'. lv_temp = organization_id. @@ -646,7 +643,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. METHOD zif_prvd_ident~updateuser. - DATA lv_code TYPE i. + DATA lv_temp TYPE string. DATA lv_uri TYPE string VALUE '/tokens'. mi_client->request->set_method( 'PUT' ). @@ -655,7 +652,7 @@ CLASS zcl_prvd_ident IMPLEMENTATION. mi_client->request->set_header_field( name = 'name' value = name ). * todo, set body, #/components/schemas/UpdateuserRequest - lv_code = send_receive( ). + DATA(lv_code) = send_receive( ). ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING json = ev_apiresponsestr CHANGING data = ev_apiresponse ). diff --git a/src/zcl_prvd_nchain.clas.abap b/src/zcl_prvd_nchain.clas.abap index 12d2397..65b0ad1 100644 --- a/src/zcl_prvd_nchain.clas.abap +++ b/src/zcl_prvd_nchain.clas.abap @@ -11,7 +11,6 @@ CLASS zcl_prvd_nchain DEFINITION PUBLIC. mv_tenantid TYPE zcasesensitive_str. METHODS send_receive RETURNING VALUE(rv_code) TYPE i. PRIVATE SECTION. - METHODS sap_auth_check. METHODS get_bpi_token RAISING cx_static_check. ENDCLASS. @@ -37,12 +36,6 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. value = lv_bearertoken ). ENDMETHOD. - - METHOD sap_auth_check. - "TODO create authorization field in su20. need to check default character length for tenant id. SAP auth check limits to 40 chars. - ENDMETHOD. - - METHOD zif_prvd_nchain~listconnectors. DATA lv_code TYPE i. DATA lv_temp TYPE string. @@ -65,7 +58,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. "success @@ -91,10 +84,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -119,7 +112,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. "success @@ -147,7 +140,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. "success @@ -175,10 +168,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -203,10 +196,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -231,10 +224,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -259,10 +252,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -287,10 +280,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -314,10 +307,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -340,10 +333,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -356,8 +349,6 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. mi_client->request->set_method( 'GET' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). - " mi_client->request->set_header_field( name = 'content-type' - " value = iv_content_type ). get_bpi_token( ). lv_code = send_receive( ). ev_httpresponsecode = lv_code. @@ -367,10 +358,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -397,10 +388,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -413,8 +404,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. mi_client->request->set_method( 'GET' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). - "mi_client->request->set_header_field( name = 'content-type' - " value = iv_content_type ). + get_bpi_token( ). lv_code = send_receive( ). ev_httpresponsecode = lv_code. @@ -424,10 +414,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -445,7 +435,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. value = lv_uri ). zcl_prvd_api_helper=>copy_data_to_ref( EXPORTING is_data = is_walletrequest - CHANGING cr_data = lv_requestdata ). + CHANGING cr_data = lv_requestdata ). lv_requeststr = /ui2/cl_json=>serialize( data = lv_requestdata pretty_name = /ui2/cl_json=>pretty_mode-low_case ). @@ -460,12 +450,11 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. EXPORTING json = ev_apiresponsestr CHANGING - data = ev_apiresponse - ). - "WRITE / lv_code. ~replace with logging call + data = ev_apiresponse ). + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -496,10 +485,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -523,10 +512,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -543,12 +532,12 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. value = lv_uri ). zcl_prvd_api_helper=>copy_data_to_ref( EXPORTING is_data = is_nchain_txn - CHANGING cr_data = lv_txndata ). + CHANGING cr_data = lv_txndata ). lv_requeststr = /ui2/cl_json=>serialize( data = lv_txndata pretty_name = /ui2/cl_json=>pretty_mode-low_case ). - mi_client->request->set_cdata( data = lv_requeststr ). + mi_client->request->set_cdata( lv_requeststr ). get_bpi_token( ). lv_code = send_receive( ). @@ -559,10 +548,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -589,10 +578,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -614,10 +603,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -640,10 +629,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -668,10 +657,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -710,10 +699,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -752,10 +741,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -778,10 +767,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -816,10 +805,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -838,7 +827,7 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. value = lv_uri ). zcl_prvd_api_helper=>copy_data_to_ref( EXPORTING is_data = is_contract - CHANGING cr_data = lv_requestdata ). + CHANGING cr_data = lv_requestdata ). lv_requeststr = /ui2/cl_json=>serialize( data = lv_requestdata pretty_name = /ui2/cl_json=>pretty_mode-low_case ). @@ -854,10 +843,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. @@ -891,10 +880,10 @@ CLASS zcl_prvd_nchain IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. - "Success + RETURN. WHEN OTHERS. "message error calling &1-method &2-lv_uri. HTTP response &3-lv_code ENDCASE. diff --git a/src/zcl_prvd_tenants_helper.clas.abap b/src/zcl_prvd_tenants_helper.clas.abap index 9f3a3cd..c8d557b 100644 --- a/src/zcl_prvd_tenants_helper.clas.abap +++ b/src/zcl_prvd_tenants_helper.clas.abap @@ -36,15 +36,16 @@ CLASS zcl_prvd_tenants_helper DEFINITION METHODS get_refreshtoken EXPORTING !ev_prvdtenantid TYPE zprvdtenantid . + "! Gets an access token for the given SAP user METHODS get_authtoken EXPORTING !ev_prvdtenantid TYPE zprvdtenantid . "! Creates the refresh token for the SAP user, given PRVD ident credentials - methods update_refresh_token - importing - !iv_email type string - !iv_password type zcasesensitive_str - !iv_prvd_org type zprvdtenantid . + METHODS update_refresh_token + IMPORTING + !iv_email TYPE string + !iv_password TYPE zcasesensitive_str + !iv_prvd_org TYPE zprvdtenantid . PROTECTED SECTION. PRIVATE SECTION. ENDCLASS. @@ -66,15 +67,6 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. CHECK it_prvdtenant IS NOT INITIAL. "duplicate check - - "TODO improve data validation process, add subject account id - "throw out error message if the tenant already exists -* SELECT * FROM zprvdtenants INTO TABLE lt_existingprvdtenant -* FOR ALL ENTRIES IN it_prvdtenant WHERE tenant_id = it_prvdtenant-tenant_id. -* IF sy-dbcnt > 0. -* MESSAGE e004(zclproubcmsg) WITH 'orgid'. -* ENDIF. - GET TIME STAMP FIELD lv_timestamp. LOOP AT it_prvdtenant ASSIGNING FIELD-SYMBOL(). @@ -109,7 +101,7 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. IF sy-subrc <> 0. "TODO add raise exception here ELSE. - MOVE-CORRESPONDING lt_prvdtenant TO et_prvdtenant. + et_prvdtenant = corresponding( lt_prvdtenant ). ENDIF. ENDMETHOD. @@ -140,7 +132,7 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. lo_api_helper TYPE REF TO zcl_prvd_api_helper. lo_api_helper = NEW zcl_prvd_api_helper( ). - SELECT * FROM zprvdtenants INTO TABLE lt_prvdtenant. + SELECT * FROM zprvdtenants INTO TABLE lt_prvdtenant ORDER BY zprvdtenantid. IF sy-subrc = 0. ELSEIF sy-subrc EQ 4. "# can't find it. thats ok @@ -182,13 +174,13 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. lo_api_helper = NEW zcl_prvd_api_helper( ). IF iv_prvdtenant IS NOT INITIAL. - SELECT SINGLE * FROM zprvdtenants INTO ls_prvdtenant WHERE organization_id = iv_prvdtenant - AND subject_account_id = iv_subjacctid. + SELECT SINGLE * FROM zprvdtenants INTO @ls_prvdtenant WHERE organization_id = @iv_prvdtenant + AND subject_account_id = @iv_subjacctid. IF sy-subrc <> 0. "message no PRVD tenant found ENDIF. ELSE. - SELECT SINGLE * FROM zprvdtenants INTO ls_prvdtenant WHERE subject_account_id = iv_subjacctid. + SELECT SINGLE * FROM zprvdtenants INTO @ls_prvdtenant WHERE subject_account_id = @iv_subjacctid. IF sy-subrc <> 0. "message no PRVD tenant found ENDIF. @@ -223,15 +215,14 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. "todo what authentication is needed here? cl_http_client=>create_by_url( - EXPORTING - url = lv_identapiurl - IMPORTING - client = lo_http_client - EXCEPTIONS - argument_not_found = 1 - plugin_not_active = 2 - internal_error = 3 - ). + EXPORTING + url = lv_identapiurl + IMPORTING + client = lo_http_client + EXCEPTIONS + argument_not_found = 1 + plugin_not_active = 2 + internal_error = 3 ). IF sy-subrc NE 0. "todo add exception handling here @@ -305,29 +296,29 @@ CLASS zcl_prvd_tenants_helper IMPLEMENTATION. ENDMETHOD. - method update_refresh_token. - DATA: + METHOD update_refresh_token. + DATA: lo_http_client TYPE REF TO if_http_client, lo_ident_api TYPE REF TO zif_prvd_ident, - lo_bpi_api type ref to zif_prvd_baseline, + lo_bpi_api TYPE REF TO zif_prvd_baseline, ls_prvdtenant TYPE zprvdtenants, lv_refreshtokenstr TYPE zprvdrefreshtoken, lv_identurl TYPE string, - lv_bpiurl type string, + lv_bpiurl TYPE string, lv_apiresponse TYPE REF TO data, lv_tenant TYPE zprvdtenantid, lv_subjacct TYPE zprvdtenants-subject_account_id, lv_authtokenreqbody TYPE zif_prvd_ident=>refresh_accesstoken_request, lv_apiresponsestr TYPE string, - ls_basic_authbody type zif_prvd_ident=>authenticationrequest, - ls_token_authbody type zif_prvd_ident=>authorize_access_refreshtoken. + ls_basic_authbody TYPE zif_prvd_ident=>authenticationrequest, + ls_token_authbody TYPE zif_prvd_ident=>authorize_access_refreshtoken. "set some defaults, if not already set - lv_identurl = 'https://ident.provide.services'. - lv_bpiurl = 'https://axiom.provide.services'. + lv_identurl = 'https://ident.provide.services'. + lv_bpiurl = 'https://axiom.provide.services'. "set up an Ident API Proxy - cl_http_client=>create_by_url( + cl_http_client=>create_by_url( EXPORTING url = lv_identurl IMPORTING diff --git a/src/zcl_prvd_vault.clas.abap b/src/zcl_prvd_vault.clas.abap index ae42319..50b6d37 100644 --- a/src/zcl_prvd_vault.clas.abap +++ b/src/zcl_prvd_vault.clas.abap @@ -8,7 +8,8 @@ CLASS zcl_prvd_vault DEFINITION "! Constructor method for instantiating the PRVD Vault API proxy METHODS constructor IMPORTING !ii_client TYPE REF TO if_http_client !iv_tenant TYPE zprvdtenantid - !iv_bpitoken TYPE zprvdrefreshtoken. + !iv_bpitoken TYPE zprvdrefreshtoken + !iv_vaulthost TYPE zcasesensitive_str. PROTECTED SECTION. DATA mi_client TYPE REF TO if_http_client. DATA mv_vault_url TYPE string VALUE 'https://vault.provide.services'. @@ -30,6 +31,9 @@ CLASS zcl_prvd_vault IMPLEMENTATION. mi_client = ii_client. mv_bpitoken = iv_bpitoken. mv_tenantid = iv_tenant. + IF iv_vaulthost IS NOT INITIAL. + mv_vault_url = iv_vaulthost. + ENDIF. ENDMETHOD. @@ -40,23 +44,16 @@ CLASS zcl_prvd_vault IMPLEMENTATION. value = lv_bearertoken ). ENDMETHOD. - - METHOD sap_auth_check. - "TODO create authorization field in su20. need to check default character length for tenant id. SAP auth check limits to 40 chars. - ENDMETHOD. - - METHOD send_receive. mi_client->send( ). mi_client->receive( ). mi_client->response->get_status( IMPORTING code = rv_code ). ENDMETHOD. - METHOD zif_prvd_vault~createseal_unsealkey. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/unsealerkey'. + DATA lv_uri TYPE string VALUE '/api/v1/unsealerkey'. mi_client->request->set_method( 'POST' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). @@ -71,7 +68,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. WHEN OTHERS. @@ -82,7 +79,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~create_key. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/keys'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/keys'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -101,7 +98,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. WHEN OTHERS. @@ -112,7 +109,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~create_vault. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults'. mi_client->request->set_method( 'POST' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). @@ -130,9 +127,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -141,7 +139,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~delete_key. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/keys/{key_id}'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/keys/{key_id}'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -162,9 +160,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -173,7 +172,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~delete_secret. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/secrets/{secret_id}'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/secrets/{secret_id}'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -195,9 +194,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -206,7 +206,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~derive_key. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/derive'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/derive'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -225,9 +225,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -252,9 +253,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -263,7 +265,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~list_secrets. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/secrets'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/secrets'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -281,9 +283,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -292,26 +295,25 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~list_vaults. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults'. DATA lv_responsestr TYPE string. mi_client->request->set_method( 'GET' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). get_bpi_token( ). - "mi_client->request->set_cdata( body ). lv_code = send_receive( ). ev_httpresponsecode = lv_code. lv_responsestr = mi_client->response->get_cdata( ). ev_apiresponsestr = lv_responsestr. /ui2/cl_json=>deserialize( EXPORTING - json = lv_responsestr + json = lv_responsestr CHANGING - data = ev_apiresponse - ). - "WRITE / lv_code. ~replace with logging call + data = ev_apiresponse ). + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -320,7 +322,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~retreive_secret. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/vaults/{vault_id}/secrets/{secret_id}'. + DATA lv_uri TYPE string VALUE '/api/v1/vaults/{vault_id}/secrets/{secret_id}'. lv_temp = iv_vault_id. lv_temp = cl_http_utility=>escape_url( condense( lv_temp ) ). REPLACE ALL OCCURRENCES OF '{vault_id}' IN lv_uri WITH lv_temp. @@ -339,12 +341,13 @@ CLASS zcl_prvd_vault IMPLEMENTATION. ev_apiresponsestr = mi_client->response->get_cdata( ). /ui2/cl_json=>deserialize( EXPORTING - json = ev_apiresponsestr + json = ev_apiresponsestr CHANGING - data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + data = ev_apiresponse ). + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -353,7 +356,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. METHOD zif_prvd_vault~unseal_vault. DATA lv_code TYPE i. DATA lv_temp TYPE string. - DATA lv_uri TYPE string VALUE 'https://vault.provide.services/api/v1/unseal'. + DATA lv_uri TYPE string VALUE '/api/v1/unseal'. mi_client->request->set_method( 'POST' ). mi_client->request->set_header_field( name = '~request_uri' value = lv_uri ). @@ -369,9 +372,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. @@ -395,7 +399,7 @@ CLASS zcl_prvd_vault IMPLEMENTATION. mi_client->request->set_header_field( name = 'Content-Type' value = iv_content_type ). - lv_request_str = /ui2/cl_json=>serialize( data = is_message + lv_request_str = /ui2/cl_json=>serialize( data = is_message pretty_name = /ui2/cl_json=>pretty_mode-low_case ). @@ -408,9 +412,10 @@ CLASS zcl_prvd_vault IMPLEMENTATION. json = ev_apiresponsestr CHANGING data = ev_apiresponse ). - "WRITE / lv_code. ~replace with logging call + CASE lv_code. WHEN 200. + RETURN. WHEN OTHERS. ENDCASE. ENDMETHOD. diff --git a/src/zcl_prvd_vault_helper.clas.abap b/src/zcl_prvd_vault_helper.clas.abap index 098c033..166228b 100644 --- a/src/zcl_prvd_vault_helper.clas.abap +++ b/src/zcl_prvd_vault_helper.clas.abap @@ -26,20 +26,26 @@ CLASS zcl_prvd_vault_helper DEFINITION METHODS create_vault . "! Derives a key for METHODS derive_key . - METHODS list_keys IMPORTING iv_vault_id TYPE zprvdvaultid RETURNING VALUE(rt_vault_keys) TYPE zif_prvd_vault=>ty_vault_keys_list. + METHODS list_keys IMPORTING iv_vault_id TYPE zprvdvaultid + RETURNING VALUE(rt_vault_keys) TYPE zif_prvd_vault=>ty_vault_keys_list. "! Deletes the specified user key upon user request METHODS delete_keys . "! Encrypts data - METHODS encrypt . + METHODS encrypt IMPORTING iv_vault_id TYPE zprvdvaultid + iv_key_id TYPE zprvdvaultid. "! Decrypts data - METHODS decrypt . + METHODS decrypt IMPORTING iv_vault_id TYPE zprvdvaultid + iv_key_id TYPE zprvdvaultid. "! Used to cryptographically sign data - METHODS sign IMPORTING iv_vault_id TYPE zprvdvaultid - iv_key_id TYPE zprvdvaultid - is_message TYPE zif_prvd_vault=>ty_signed_message + METHODS vault_sign IMPORTING iv_vault_id TYPE zprvdvaultid + iv_key_id TYPE zprvdvaultid + is_message TYPE zif_prvd_vault=>ty_signed_message RETURNING VALUE(rs_vault_signed_message) TYPE zif_prvd_vault=>ty_signature . "! Used to cryptographically verify data - METHODS verify . + METHODS verify IMPORTING iv_vault_id TYPE zprvdvaultid + iv_key_id TYPE zprvdvaultid + is_message TYPE zif_prvd_vault=>ty_signed_message + RETURNING VALUE(rv_verified) TYPE boolean . "! Initializes other aspects of the vault helper class to ensure connectivity to Vault microservice METHODS setup_vault_msgs . "! Retrieves the wallet address per Vault data input specs @@ -133,49 +139,14 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. value = '100' ). mo_vault_api = NEW zcl_prvd_vault( ii_client = mo_http_client - iv_tenant = mv_org_id - iv_bpitoken = mv_prvd_token ). - - - - - -* IF io_api_helper IS BOUND. -* mo_api_helper = io_api_helper. -* ELSE. -* mo_api_helper = NEW zcl_prvd_api_helper( iv_tenant = iv_org_id -* iv_subject_acct_id = iv_subject_account_id -* iv_workgroup_id = iv_workgroup_id ). -* ENDIF. -* -* mv_vault_api_url = 'https://vault.provide.services'. -* -* cl_http_client=>create_by_url( -* EXPORTING -* url = mv_vault_api_url -* IMPORTING -* client = mo_http_client -* EXCEPTIONS -* argument_not_found = 1 -* plugin_not_active = 2 -* internal_error = 3 -* OTHERS = 4 ). -* IF sy-subrc <> 0. -* " error handling -* ENDIF. -* -* mo_http_client->propertytype_accept_cookie = if_http_client=>co_enabled. -* mo_http_client->request->set_header_field( name = if_http_form_fields_sap=>sap_client -* value = '100' ). - - "todo fix params - "mo_vault_api = NEW zcl_proubc_vault( ii_client = mo_http_client iv_tenant = mv_tenant iv_bpitoken = lv_bpitoken ). + iv_tenant = mv_org_id + iv_bpitoken = mv_prvd_token ). ENDMETHOD. METHOD create_key. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). * mo_vault_api->create_key( * EXPORTING * authorization = @@ -188,34 +159,34 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. METHOD create_vault. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). * mo_vault_api->create_vault( * EXPORTING * content_type = * authorization = * body = * ). -* CATCH cx_static_check. +* CATCH cx_static_check ENDMETHOD. METHOD decrypt. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). ENDMETHOD. METHOD delete_keys. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). ENDMETHOD. METHOD derive_key. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). ENDMETHOD. METHOD encrypt. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). ENDMETHOD. @@ -239,7 +210,9 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. mo_http_client->request->set_header_field( name = if_http_form_fields_sap=>sap_client value = '100' ). "todo fix params - mo_vault_api = NEW zcl_prvd_vault( ii_client = mo_http_client iv_tenant = mv_tenant iv_bpitoken = mv_prvd_token ). + mo_vault_api = NEW zcl_prvd_vault( ii_client = mo_http_client + iv_tenant = mv_tenant + iv_bpitoken = mv_prvd_token ). ro_vault_client = mo_vault_api. ELSE. ro_vault_client = mo_vault_api. @@ -256,24 +229,21 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. DATA: lv_apiresponsestr TYPE string, lv_apiresponse TYPE REF TO data, lv_httpresponsecode TYPE i. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). mo_vault_api->zif_prvd_vault~list_keys( EXPORTING - iv_vault_id = iv_vault_id + iv_vault_id = iv_vault_id IMPORTING ev_apiresponsestr = lv_apiresponsestr ev_apiresponse = lv_apiresponse - ev_httpresponsecode = lv_httpresponsecode - ). + ev_httpresponsecode = lv_httpresponsecode ). IF lv_httpresponsecode EQ 200. /ui2/cl_json=>deserialize( EXPORTING json = lv_apiresponsestr CHANGING - data = rt_vault_keys - ). + data = rt_vault_keys ). ENDIF. -* CATCH cx_static_check. ENDMETHOD. @@ -281,23 +251,19 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. DATA: lv_apiresponsestr TYPE string, lv_apiresponse TYPE REF TO data, lv_httpresponsecode TYPE i. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). mo_vault_api->zif_prvd_vault~list_vaults( IMPORTING ev_apiresponsestr = lv_apiresponsestr ev_apiresponse = lv_apiresponse - ev_httpresponsecode = lv_httpresponsecode - ). + ev_httpresponsecode = lv_httpresponsecode ). IF lv_httpresponsecode EQ 200. /ui2/cl_json=>deserialize( EXPORTING json = lv_apiresponsestr CHANGING - data = rt_vault_list - ). + data = rt_vault_list ). ENDIF. - -* CATCH cx_static_check. ENDMETHOD. @@ -309,7 +275,7 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. DATA: lv_apiresponsestr TYPE string, lv_apiresponse TYPE REF TO data, lv_httpresponsecode TYPE i. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). mo_vault_api->zif_prvd_vault~sign( EXPORTING iv_vaultid = iv_vault_id @@ -319,8 +285,7 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. IMPORTING ev_apiresponsestr = lv_apiresponsestr ev_apiresponse = lv_apiresponse - ev_httpresponsecode = lv_httpresponsecode - ). + ev_httpresponsecode = lv_httpresponsecode ). CASE lv_httpresponsecode. WHEN 201. DATA: lif_ajson TYPE REF TO zif_ajson. @@ -330,12 +295,11 @@ CLASS zcl_prvd_vault_helper IMPLEMENTATION. WHEN OTHERS. "todo log error. ENDCASE. -* CATCH cx_static_check. ENDMETHOD. METHOD verify. - mo_vault_api = me->get_vault_client( ). + mo_vault_api = get_vault_client( ). ENDMETHOD. METHOD get_access_token. diff --git a/src/zif_prvd_baseline.intf.abap b/src/zif_prvd_baseline.intf.abap index 0efbe74..5c4b317 100644 --- a/src/zif_prvd_baseline.intf.abap +++ b/src/zif_prvd_baseline.intf.abap @@ -1,8 +1,8 @@ -interface ZIF_PRVD_BASELINE - public . +INTERFACE zif_prvd_baseline + PUBLIC . - types: + TYPES: * Generated by abap-openapi-client * Baseline API, v1.0.0 * Component schema: Account, object @@ -16,20 +16,20 @@ interface ZIF_PRVD_BASELINE public_key TYPE string, address TYPE string, END OF account . - types: + TYPES: * Component schema: AssociateWorkgroupUserRequest, object BEGIN OF associateworkgroupuserrequest, user_id TYPE string, END OF associateworkgroupuserrequest . * Component schema: AuthenticationRequest, string - types AUTHENTICATIONREQUEST type STRING . - types: + TYPES authenticationrequest TYPE string . + TYPES: * Component schema: AuthenticationResponse, object BEGIN OF authenticationresponse, user TYPE user, token TYPE token, END OF authenticationresponse . - types: + TYPES: * Component schema: Workflow, object BEGIN OF workflow, circuits TYPE string, @@ -38,7 +38,7 @@ interface ZIF_PRVD_BASELINE shield TYPE string, workstep_index TYPE i, END OF workflow . - types: + TYPES: * Component schema: BaselineRecord, object BEGIN OF baselinerecord, baseline_id TYPE string, @@ -47,19 +47,19 @@ interface ZIF_PRVD_BASELINE identifier TYPE string, workflow TYPE workflow, END OF baselinerecord . - types: + TYPES: * Component schema: BusinessObject, object BEGIN OF businessobject, type TYPE string, id TYPE string, payload TYPE string, END OF businessobject . - types: + TYPES: * Component schema: Chainspec, object BEGIN OF subchainspec_alloc, dummy_workaround TYPE i, END OF subchainspec_alloc . - types: + TYPES: BEGIN OF chainspec, config TYPE string, alloc TYPE subchainspec_alloc, @@ -72,7 +72,7 @@ interface ZIF_PRVD_BASELINE parenthash TYPE string, timestamp TYPE string, END OF chainspec . - types: + TYPES: * Component schema: Circuit, object BEGIN OF circuit, id TYPE string, @@ -89,7 +89,7 @@ interface ZIF_PRVD_BASELINE status TYPE string, store_id TYPE string, END OF circuit . - types: + TYPES: * Component schema: CompiledArtifact, object " todo, handle array in ABI BEGIN OF compiledartifact, @@ -98,7 +98,7 @@ interface ZIF_PRVD_BASELINE bytecode TYPE string, source TYPE string, END OF compiledartifact . - types: + TYPES: * Component schema: Participant, object BEGIN OF participant, address TYPE string, @@ -106,7 +106,7 @@ interface ZIF_PRVD_BASELINE api_endpoint TYPE string, messaging_endpoint TYPE string, END OF participant . - types: + TYPES: * Component schema: Config, object BEGIN OF config, counterparties TYPE participant, @@ -118,13 +118,13 @@ interface ZIF_PRVD_BASELINE organization_refresh_token TYPE string, registry_contract_address TYPE string, END OF config . - types: + TYPES: * Component schema: Security, object BEGIN OF security, egress TYPE string, ingress TYPE string, END OF security . - types: + TYPES: * Component schema: ConnectorConfig, object BEGIN OF connectorconfig, image TYPE string, @@ -138,7 +138,7 @@ interface ZIF_PRVD_BASELINE api_port TYPE i, api_url TYPE string, END OF connectorconfig . - types: + TYPES: * Component schema: Connector, object BEGIN OF connector, id TYPE string, @@ -152,13 +152,13 @@ interface ZIF_PRVD_BASELINE description TYPE string, config TYPE connectorconfig, END OF connector . - types: + TYPES: * Component schema: ContractParams, object BEGIN OF contractparams, account_id TYPE string, compiled_artifact TYPE compiledartifact, END OF contractparams . - types: + TYPES: * Component schema: Contract, object BEGIN OF contract, id TYPE string, @@ -175,19 +175,19 @@ interface ZIF_PRVD_BASELINE pubsub_prefix TYPE string, params TYPE contractparams, END OF contract . - types: + TYPES: * Component schema: CreateSealorUnsealKey, object BEGIN OF createsealorunsealkey, key TYPE string, validation_hash TYPE string, END OF createsealorunsealkey . - types: + TYPES: * Component schema: Credentials, object BEGIN OF credentials, aws_access_key_id TYPE string, aws_secret_access_key TYPE string, END OF credentials . - types: + TYPES: * Component schema: DeployContract, object BEGIN OF ty_deploycontract, id TYPE string, @@ -204,7 +204,7 @@ interface ZIF_PRVD_BASELINE accessed_at TYPE string, pubsub_prefix TYPE string, END OF ty_deploycontract . - types: + TYPES: * Component schema: DeriveKeyRequest, object BEGIN OF derivekeyrequest, nonce TYPE i, @@ -212,13 +212,13 @@ interface ZIF_PRVD_BASELINE name TYPE string, description TYPE string, END OF derivekeyrequest . - types: + TYPES: * Component schema: Error, object BEGIN OF error, code TYPE string, message TYPE string, END OF error . - types: + TYPES: * Component schema: ExecuteContractRequest, object BEGIN OF executecontractrequest, method TYPE string, @@ -226,13 +226,13 @@ interface ZIF_PRVD_BASELINE value TYPE i, account_id TYPE string, END OF executecontractrequest . - types: + TYPES: * Component schema: ExecuteContractResponse, object BEGIN OF executecontractresponse, confidence TYPE string, ref TYPE string, END OF executecontractresponse . - types: + TYPES: " TODO fix Ingress type * Component schema: Ingress, object " TYPES: BEGIN OF ingress, @@ -245,7 +245,7 @@ interface ZIF_PRVD_BASELINE public_key TYPE string, signature TYPE string, END OF issueverifiablecredential . - types: + TYPES: * Component schema: JWK, object BEGIN OF jwk, kid TYPE string, @@ -254,7 +254,7 @@ interface ZIF_PRVD_BASELINE fingerprint TYPE string, public_key TYPE string, END OF jwk . - types: + TYPES: * Component schema: Key, object BEGIN OF key, type TYPE string, @@ -264,7 +264,7 @@ interface ZIF_PRVD_BASELINE description TYPE string, public_key TYPE string, END OF key . - types: + TYPES: * Component schema: LastBlockHeader, object BEGIN OF lastblockheader, difficulty TYPE string, @@ -284,7 +284,7 @@ interface ZIF_PRVD_BASELINE timestamp TYPE string, transactionsroot TYPE string, END OF lastblockheader . - types: + TYPES: * Component schema: LoadBalancer, object BEGIN OF loadbalancer, id TYPE string, @@ -300,7 +300,7 @@ interface ZIF_PRVD_BASELINE region TYPE string, status TYPE string, END OF loadbalancer . - types: + TYPES: * Component schema: LogMessage, object BEGIN OF logmessage, baseline_id TYPE string, @@ -310,7 +310,7 @@ interface ZIF_PRVD_BASELINE timestamp TYPE string, type TYPE string, END OF logmessage . - types: + TYPES: * Component schema: Message, object BEGIN OF message, baseline_id TYPE string, @@ -322,7 +322,7 @@ interface ZIF_PRVD_BASELINE recipients TYPE string, type TYPE string, END OF message . - types: + TYPES: * Component schema: Network, object BEGIN OF network, id TYPE string, @@ -335,21 +335,21 @@ interface ZIF_PRVD_BASELINE config TYPE string, END OF network . * Component schema: NetworkStatus, string - types NETWORKSTATUS type STRING . - types: + TYPES networkstatus TYPE string . + TYPES: * Component schema: OpenIDConfig, object BEGIN OF subopenidconfig_tenant_region_, dummy_workaround TYPE i, END OF subopenidconfig_tenant_region_ . - types: + TYPES: BEGIN OF subopenidconfig_rbac_url, dummy_workaround TYPE i, END OF subopenidconfig_rbac_url . - types: + TYPES: BEGIN OF subopenidconfig_end_session_en, dummy_workaround TYPE i, END OF subopenidconfig_end_session_en . - types: + TYPES: BEGIN OF openidconfig, authorization_endpoint TYPE string, claims_supported TYPE STANDARD TABLE OF string WITH EMPTY KEY, @@ -372,13 +372,13 @@ interface ZIF_PRVD_BASELINE token_endpoint_auth_methods_su TYPE STANDARD TABLE OF string WITH EMPTY KEY, userinfo_endpoint TYPE string, END OF openidconfig . - types: + TYPES: * Component schema: Organization, object BEGIN OF organization, name TYPE string, description TYPE string, END OF organization . - types: + TYPES: * Component schema: ProtocolMessage, object BEGIN OF protocolmessage, baseline_id TYPE string, @@ -391,7 +391,7 @@ interface ZIF_PRVD_BASELINE type TYPE string, payload TYPE xstring, END OF protocolmessage . - types: + TYPES: BEGIN OF protocolmessage_req, id TYPE zbpiobj-object_id, payload TYPE REF TO data, @@ -400,7 +400,7 @@ interface ZIF_PRVD_BASELINE subject_account_id TYPE zprvdtenantid, workgroup_id TYPE zprvdtenantid, END OF protocolmessage_req . - types: + TYPES: BEGIN OF protocolmessage_resp, baseline_id TYPE string, proof TYPE string, @@ -409,13 +409,13 @@ interface ZIF_PRVD_BASELINE type TYPE string, workgroup_id TYPE zprvdtenantid, END OF protocolmessage_resp . - types: + TYPES: BEGIN OF bpiobjects_req, type TYPE string, id TYPE string, payload TYPE string, END OF bpiobjects_req . - types: + TYPES: * Component schema: ProtocolMessagePayload, string " TYPES protocolmessagepayload TYPE string. * Component schema: ProveRequest, object @@ -426,7 +426,7 @@ interface ZIF_PRVD_BASELINE provider TYPE string, name TYPE string, END OF proverequest . - types: + TYPES: * Component schema: Secret, object BEGIN OF secret, id TYPE string, @@ -437,7 +437,7 @@ interface ZIF_PRVD_BASELINE description TYPE string, value TYPE string, END OF secret . - types: + TYPES: * Component schema: Token, object BEGIN OF token, id TYPE string, @@ -451,13 +451,13 @@ interface ZIF_PRVD_BASELINE application_id TYPE string, END OF token . * Component schema: Transaction, string - types TRANSACTION type STRING . - types: + TYPES transaction TYPE string . + TYPES: * Component schema: UnsealVaultRequest, object BEGIN OF unsealvaultrequest, key TYPE string, END OF unsealvaultrequest . - types: + TYPES: * Component schema: User, object BEGIN OF user, id TYPE string, @@ -472,21 +472,21 @@ interface ZIF_PRVD_BASELINE terms_of_service_agreed_at TYPE string, END OF user . * Component schema: Vault, string - types VAULT type STRING . - types: + TYPES vault TYPE string . + TYPES: * Component schema: Witness, object BEGIN OF witness, x TYPE string, y TYPE string, END OF witness . - types: + TYPES: * Component schema: VerifyProofRequest, object BEGIN OF verifyproofrequest, witness TYPE witness, proof TYPE string, store TYPE abap_bool, END OF verifyproofrequest . - types: + TYPES: * Component schema: Wallet, object BEGIN OF wallet, id TYPE string, @@ -498,14 +498,14 @@ interface ZIF_PRVD_BASELINE purpose TYPE i, public_key TYPE string, END OF wallet . - types: + TYPES: * Component schema: WorkgroupConfig, object BEGIN OF workgroupconfig, baselined TYPE abap_bool, webhook_secret TYPE string, network_id TYPE string, END OF workgroupconfig . - types: + TYPES: * Component schema: Workgroup, object BEGIN OF workgroup, id TYPE string, @@ -518,19 +518,19 @@ interface ZIF_PRVD_BASELINE config TYPE workgroupconfig, hidden TYPE abap_bool, END OF workgroup . - types: + TYPES: * Component schema: response_listconnectors, array response_listconnectors TYPE STANDARD TABLE OF connector WITH EMPTY KEY . - types: + TYPES: * Component schema: response_listtokens, array response_listtokens TYPE STANDARD TABLE OF token WITH EMPTY KEY . - types: + TYPES: * Component schema: response_listusers, array response_listusers TYPE STANDARD TABLE OF user WITH EMPTY KEY . - types: + TYPES: * Component schema: response_listworkgroups, array response_listworkgroups TYPE STANDARD TABLE OF workgroup WITH EMPTY KEY . - types: + TYPES: * Component schema: response_listworkgroupusers, array response_listworkgroupusers TYPE STANDARD TABLE OF user WITH EMPTY KEY . @@ -544,12 +544,12 @@ interface ZIF_PRVD_BASELINE "! Response: 500 "! Response: default "! application/json, #/components/schemas/Error - methods LISTACCOUNTS - importing - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listaccounts + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create account" "! Operation id: CreateAccount "! Response: 201 @@ -559,11 +559,11 @@ interface ZIF_PRVD_BASELINE "! Response: default "! application/json, #/components/schemas/Error "! Body ref: #/components/schemas/Account - methods CREATEACCOUNT - importing - !BODY type ACCOUNT - raising - CX_STATIC_CHECK . + METHODS createaccount + IMPORTING + !body TYPE account + RAISING + cx_static_check . "! GET - "Get account details" "! Operation id: GetAccountDetails "! Parameter: id, required, path @@ -573,27 +573,27 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: default "! application/json, #/components/schemas/Error - methods GETACCOUNTDETAILS - importing - !ID type STRING - returning - value(RETURN_DATA) type ACCOUNT - raising - CX_STATIC_CHECK . + METHODS getaccountdetails + IMPORTING + !id TYPE string + RETURNING + VALUE(return_data) TYPE account + RAISING + cx_static_check . "! POST - "User authentication" "! Operation id: Authentication "! Response: 201 "! application/json, #/components/schemas/AuthenticationResponse "! Response: 401 "! Body ref: #/components/schemas/AuthenticationRequest - methods AUTHENTICATION - importing - !BODY type AUTHENTICATIONREQUEST - !IV_TENANTID type ZPRVDTENANTID - returning - value(RETURN_DATA) type AUTHENTICATIONRESPONSE - raising - CX_STATIC_CHECK . + METHODS authentication + IMPORTING + !body TYPE authenticationrequest + !iv_tenantid TYPE zprvdtenantid + RETURNING + VALUE(return_data) TYPE authenticationresponse + RAISING + cx_static_check . "VALUE(return_data) TYPE authenticationresponse "! POST - "Bearer authentication" "! Operation id: Authentication @@ -601,16 +601,16 @@ interface ZIF_PRVD_BASELINE "! application/json, #/components/schemas/AuthenticationResponse "! Response: 401 "! Body ref: #/components/schemas/AuthenticationRequest - methods BEARERAUTHENTICATION - importing - !BODY type AUTHENTICATIONREQUEST - !IV_TENANTID type ZPRVDTENANTID - exporting - !CODE type I - returning - value(APIRESPONSE) type ref to DATA - raising - CX_STATIC_CHECK . + METHODS bearerauthentication + IMPORTING + !body TYPE authenticationrequest + !iv_tenantid TYPE zprvdtenantid + EXPORTING + !code TYPE i + RETURNING + VALUE(apiresponse) TYPE REF TO data + RAISING + cx_static_check . "! GET - "List connectors" "! Operation id: ListConnectors "! Parameter: page, optional, query @@ -622,15 +622,15 @@ interface ZIF_PRVD_BASELINE "! application/json, #/components/schemas/Error "! Response: default "! application/json, #/components/schemas/Error - methods LISTCONNECTORS - importing - !PAGE type I optional - !RPP type I optional - !PUBLIC type ABAP_BOOL optional - returning - value(RETURN_DATA) type RESPONSE_LISTCONNECTORS - raising - CX_STATIC_CHECK . + METHODS listconnectors + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + !public TYPE abap_bool OPTIONAL + RETURNING + VALUE(return_data) TYPE response_listconnectors + RAISING + cx_static_check . "! POST - "Create connector" "! Operation id: CreateConnector "! Response: 201 @@ -642,11 +642,11 @@ interface ZIF_PRVD_BASELINE "! Response: default "! application/json, #/components/schemas/Error "! Body ref: #/components/schemas/Connector - methods CREATECONNECTOR - importing - !BODY type CONNECTOR - raising - CX_STATIC_CHECK . + METHODS createconnector + IMPORTING + !body TYPE connector + RAISING + cx_static_check . "! GET - "Get connector details" "! Operation id: GetConnectorDetails "! Parameter: id, required, path @@ -658,11 +658,11 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "! application/json, #/components/schemas/Error - methods GETCONNECTORDETAILS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getconnectordetails + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! DELETE - "Delete connector" "! Operation id: deleteConnector "! Parameter: id, required, path @@ -670,11 +670,11 @@ interface ZIF_PRVD_BASELINE "! Response: 401 "! Response: default "! application/json, #/components/schemas/Error - methods DELETECONNECTOR - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS deleteconnector + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "Retrieve load balancer details" "! Operation id: GetLoadBalancerDetails "! Parameter: id, required, path @@ -686,11 +686,11 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "! application/json, #/components/schemas/Error - methods GETLOADBALANCERDETAILS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getloadbalancerdetails + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "List contracts" "! Operation id: ListContracts "! Parameter: filter_tokens, optional, query @@ -705,14 +705,14 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "! application/json, #/components/schemas/Error - methods LISTCONTRACTS - importing - !FILTER_TOKENS type ABAP_BOOL optional - !SORT type STRING optional - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listcontracts + IMPORTING + !filter_tokens TYPE abap_bool OPTIONAL + !sort TYPE string OPTIONAL + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Deploy contract" "! Operation id: DeployContract "! Response: 201 @@ -724,11 +724,11 @@ interface ZIF_PRVD_BASELINE "! application/json, #/components/schemas/Error "! Response: 503 "! Body ref: #/components/schemas/Contract - methods DEPLOYCONTRACT - importing - !BODY type CONTRACT - raising - CX_STATIC_CHECK . + METHODS deploycontract + IMPORTING + !body TYPE contract + RAISING + cx_static_check . "!! GET - "Get contract detail" "! Operation id: GetContractDetail "! Parameter: id, required, path @@ -740,11 +740,11 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "!! application/json, #/components/schemas/Error - methods GETCONTRACTDETAIL - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getcontractdetail + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! POST - "Execute contract" "! Operation id: ExecuteContract "! Parameter: id, required, path @@ -754,12 +754,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/ExecuteContractRequest - methods EXECUTECONTRACT - importing - !ID type STRING - !BODY type EXECUTECONTRACTREQUEST - raising - CX_STATIC_CHECK . + METHODS executecontract + IMPORTING + !id TYPE string + !body TYPE executecontractrequest + RAISING + cx_static_check . "! GET - "List networks" "! Operation id: ListNetworks "! Parameter: page, optional, query @@ -771,13 +771,13 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTNETWORKS - importing - !PAGE type I optional - !RPP type I optional - !PUBLIC type ABAP_BOOL optional - raising - CX_STATIC_CHECK . + METHODS listnetworks + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + !public TYPE abap_bool OPTIONAL + RAISING + cx_static_check . "! POST - "Create network" "! Operation id: CreateNetwork "! Response: 201 @@ -787,11 +787,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Network - methods CREATENETWORK - importing - !BODY type NETWORK - raising - CX_STATIC_CHECK . + METHODS createnetwork + IMPORTING + !body TYPE network + RAISING + cx_static_check . "! PUT - "Update network" "! Operation id: UpdateNetwork "! Parameter: id, required, path @@ -802,12 +802,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Network - methods UPDATENETWORK - importing - !ID type STRING - !BODY type NETWORK - raising - CX_STATIC_CHECK . + METHODS updatenetwork + IMPORTING + !id TYPE string + !body TYPE network + RAISING + cx_static_check . "! GET - "Get network status" "! Operation id: GetNetworkStatus "! Parameter: id, required, path @@ -819,11 +819,11 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "! application/json, #/components/schemas/Error - methods GETNETWORKSTATUS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getnetworkstatus + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "List oracles" "! Operation id: ListOracles "! Parameter: page, optional, query @@ -833,12 +833,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTORACLES - importing - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listoracles + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create oracle" "! Operation id: CreateOracle "! Response: 200 @@ -846,9 +846,9 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods CREATEORACLE - raising - CX_STATIC_CHECK . + METHODS createoracle + RAISING + cx_static_check . "! GET - "Get oracle details" "! Operation id: GetOracleDetail "! Parameter: id, required, path @@ -857,11 +857,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods GETORACLEDETAIL - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getoracledetail + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! PUT - "Update oracle" "! Operation id: UpdateOracle "! Parameter: id, required, path @@ -870,11 +870,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods UPDATEORACLE - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS updateoracle + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! DELETE - "Delete oracle" "! Operation id: DeleteOracle "! Parameter: id, required, path @@ -883,11 +883,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods DELETEORACLE - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS deleteoracle + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "List organizations" "! Operation id: ListOrganizations "! Parameter: page, optional, query @@ -897,12 +897,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTORGANIZATIONS - importing - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listorganizations + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create organization" "! Operation id: CreateOrganization "! Response: 201 @@ -911,11 +911,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Organization - methods CREATEORGANIZATION - importing - !BODY type ORGANIZATION - raising - CX_STATIC_CHECK . + METHODS createorganization + IMPORTING + !body TYPE organization + RAISING + cx_static_check . "! GET - "Get organization details" "! Operation id: GetOrganizationDetails "! Parameter: id, required, path @@ -924,11 +924,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods GETORGANIZATIONDETAILS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getorganizationdetails + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! PUT - "Update organization details" "! Operation id: UpdateOrganizationDetails "! Parameter: id, required, path @@ -938,12 +938,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Organization - methods UPDATEORGANIZATIONDETAILS - importing - !ID type STRING - !BODY type ORGANIZATION - raising - CX_STATIC_CHECK . + METHODS updateorganizationdetails + IMPORTING + !id TYPE string + !body TYPE organization + RAISING + cx_static_check . "! GET - "List revocable tokens" "! Operation id: ListTokens "! Parameter: page, optional, query @@ -954,14 +954,14 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTTOKENS - importing - !PAGE type I optional - !RPP type I optional - returning - value(RETURN_DATA) type RESPONSE_LISTTOKENS - raising - CX_STATIC_CHECK . + METHODS listtokens + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RETURNING + VALUE(return_data) TYPE response_listtokens + RAISING + cx_static_check . "! POST - "Token authorization" "! Operation id: TokenAuthorization "! Response: 201 @@ -971,13 +971,13 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Token - methods TOKENAUTHORIZATION - importing - !BODY type TOKEN - returning - value(RETURN_DATA) type TOKEN - raising - CX_STATIC_CHECK . + METHODS tokenauthorization + IMPORTING + !body TYPE token + RETURNING + VALUE(return_data) TYPE token + RAISING + cx_static_check . "! DELETE - "Revoke token" "! Operation id: RevokeToken "! Parameter: id, required, path @@ -986,11 +986,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods REVOKETOKEN - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS revoketoken + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "List transactions" "! Operation id: ListTransactions "! Parameter: filter_contract_creations, optional, query @@ -1003,14 +1003,14 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTTRANSACTIONS - importing - !FILTER_CONTRACT_CREATIONS type ABAP_BOOL optional - !STATUS type STRING optional - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listtransactions + IMPORTING + !filter_contract_creations TYPE abap_bool OPTIONAL + !status TYPE string OPTIONAL + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create transaction" "! Operation id: CreateTransaction "! Response: 201 @@ -1020,11 +1020,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Transaction - methods CREATETRANSACTION - importing - !BODY type TRANSACTION - raising - CX_STATIC_CHECK . + METHODS createtransaction + IMPORTING + !body TYPE transaction + RAISING + cx_static_check . "! GET - "Get transaction details" "! Operation id: GetTransactionDetails "! Parameter: id, required, path @@ -1034,11 +1034,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods GETTRANSACTIONDETAILS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS gettransactiondetails + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! GET - "List users" "! Operation id: ListUsers "! Parameter: page, optional, query @@ -1049,26 +1049,26 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTUSERS - importing - !PAGE type I optional - !RPP type I optional - returning - value(RETURN_DATA) type RESPONSE_LISTUSERS - raising - CX_STATIC_CHECK . + METHODS listusers + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RETURNING + VALUE(return_data) TYPE response_listusers + RAISING + cx_static_check . "! POST - "Create user" "! Operation id: CreateUser "! Response: 201 "! application/json, #/components/schemas/User "! Body ref: #/components/schemas/User - methods CREATEUSER - importing - !BODY type USER - returning - value(RETURN_DATA) type USER - raising - CX_STATIC_CHECK . + METHODS createuser + IMPORTING + !body TYPE user + RETURNING + VALUE(return_data) TYPE user + RAISING + cx_static_check . "! GET - "Get user detail" "! Operation id: GetUserDetail "! Parameter: id, required, path @@ -1080,11 +1080,11 @@ interface ZIF_PRVD_BASELINE "! Response: 503 "! Response: default "! application/json, #/components/schemas/Error - methods GETUSERDETAIL - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getuserdetail + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! PUT - "Update user" "! Operation id: UpdateUser "! Parameter: id, required, path @@ -1095,14 +1095,14 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/User - methods UPDATEUSER - importing - !ID type STRING - !BODY type USER - returning - value(RETURN_DATA) type USER - raising - CX_STATIC_CHECK . + METHODS updateuser + IMPORTING + !id TYPE string + !body TYPE user + RETURNING + VALUE(return_data) TYPE user + RAISING + cx_static_check . "! DELETE - "Delete user" "! Operation id: DeleteUserRequest "! Parameter: id, required, path @@ -1111,11 +1111,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods DELETEUSERREQUEST - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS deleteuserrequest + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! POST - "Unseal vault" "! Operation id: UnsealVault "! Response: 204 @@ -1124,11 +1124,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/UnsealVaultRequest - methods UNSEALVAULT - importing - !BODY type UNSEALVAULTREQUEST - raising - CX_STATIC_CHECK . + METHODS unsealvault + IMPORTING + !body TYPE unsealvaultrequest + RAISING + cx_static_check . "! GET - "List vaults" "! Operation id: ListVaults "! Parameter: page, optional, query @@ -1139,12 +1139,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTVAULTS - importing - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listvaults + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create a vault" "! Operation id: CreateVault "! Response: 201 @@ -1154,11 +1154,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Vault - methods CREATEVAULT - importing - !BODY type VAULT - raising - CX_STATIC_CHECK . + METHODS createvault + IMPORTING + !body TYPE vault + RAISING + cx_static_check . "! GET - "List keys" "! Operation id: Listkeys "! Parameter: id, required, path @@ -1170,13 +1170,13 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTKEYS - importing - !ID type STRING - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listkeys + IMPORTING + !id TYPE string + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create a key" "! Operation id: CreateKey "! Parameter: id, required, path @@ -1187,12 +1187,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Key - methods CREATEKEY - importing - !ID type STRING - !BODY type KEY - raising - CX_STATIC_CHECK . + METHODS createkey + IMPORTING + !id TYPE string + !body TYPE key + RAISING + cx_static_check . "! POST - "Derive a key" "! Operation id: DeriveaKeyRequest "! Parameter: id, required, path @@ -1204,13 +1204,13 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Key - methods DERIVEAKEYREQUEST - importing - !ID type STRING - !KEY_ID type STRING - !BODY type KEY - raising - CX_STATIC_CHECK . + METHODS deriveakeyrequest + IMPORTING + !id TYPE string + !key_id TYPE string + !body TYPE key + RAISING + cx_static_check . "! DELETE - "Delete a key" "! Operation id: Deleteakey "! Parameter: id, required, path @@ -1220,12 +1220,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods DELETEAKEY - importing - !ID type STRING - !KEY_ID type STRING - raising - CX_STATIC_CHECK . + METHODS deleteakey + IMPORTING + !id TYPE string + !key_id TYPE string + RAISING + cx_static_check . "! GET - "List secrets" "! Operation id: ListSecrets "! Parameter: id, required, path @@ -1237,13 +1237,13 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTSECRETS - importing - !ID type STRING - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listsecrets + IMPORTING + !id TYPE string + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Store secret" "! Operation id: StoreSecret "! Parameter: id, required, path @@ -1254,12 +1254,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Secret - methods STORESECRET - importing - !ID type STRING - !BODY type SECRET - raising - CX_STATIC_CHECK . + METHODS storesecret + IMPORTING + !id TYPE string + !body TYPE secret + RAISING + cx_static_check . "! GET - "Retrieve secret" "! Operation id: RetrieveSecret "! Parameter: id, required, path @@ -1270,12 +1270,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods RETRIEVESECRET - importing - !ID type STRING - !SECRET_ID type STRING - raising - CX_STATIC_CHECK . + METHODS retrievesecret + IMPORTING + !id TYPE string + !secret_id TYPE string + RAISING + cx_static_check . "! DELETE - "Delete secret" "! Operation id: DeleteSecret "! Parameter: id, required, path @@ -1286,12 +1286,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods DELETESECRET - importing - !ID type STRING - !SECRET_ID type STRING - raising - CX_STATIC_CHECK . + METHODS deletesecret + IMPORTING + !id TYPE string + !secret_id TYPE string + RAISING + cx_static_check . "! GET - "List wallets" "! Operation id: ListWallets "! Parameter: page, optional, query @@ -1302,12 +1302,12 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTWALLETS - importing - !PAGE type I optional - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listwallets + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! POST - "Create wallet" "! Operation id: CreateWallet "! Response: 201 @@ -1317,11 +1317,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Wallet - methods CREATEWALLET - importing - !BODY type WALLET - raising - CX_STATIC_CHECK . + METHODS createwallet + IMPORTING + !body TYPE wallet + RAISING + cx_static_check . "! GET - "List wallet accounts" "! Operation id: ListWalletAccounts "! Parameter: id, required, path @@ -1332,26 +1332,26 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTWALLETACCOUNTS - importing - !ID type STRING - !RPP type I optional - raising - CX_STATIC_CHECK . + METHODS listwalletaccounts + IMPORTING + !id TYPE string + !rpp TYPE i OPTIONAL + RAISING + cx_static_check . "! GET - "List workgroups" "! Operation id: ListWorkgroups "! Parameter: page, optional, query "! Parameter: rpp, optional, query "! Response: 200 "! application/json, #/components/schemas/response_listworkgroups - methods LISTWORKGROUPS - importing - !PAGE type I optional - !RPP type I optional - returning - value(RETURN_DATA) type RESPONSE_LISTWORKGROUPS - raising - CX_STATIC_CHECK . + METHODS listworkgroups + IMPORTING + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RETURNING + VALUE(return_data) TYPE response_listworkgroups + RAISING + cx_static_check . "! POST - "Create workgroup" "! Operation id: CreateWorkgroup "! Response: 200 @@ -1361,13 +1361,13 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Workgroup - methods CREATEWORKGROUP - importing - !BODY type WORKGROUP - returning - value(RETURN_DATA) type WORKGROUP - raising - CX_STATIC_CHECK . + METHODS createworkgroup + IMPORTING + !body TYPE workgroup + RETURNING + VALUE(return_data) TYPE workgroup + RAISING + cx_static_check . "! GET - "List workgroup users" "! Operation id: ListWorkgroupUsers "! Parameter: id, required, path @@ -1379,15 +1379,15 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTWORKGROUPUSERS - importing - !ID type STRING - !PAGE type I optional - !RPP type I optional - returning - value(RETURN_DATA) type RESPONSE_LISTWORKGROUPUSERS - raising - CX_STATIC_CHECK . + METHODS listworkgroupusers + IMPORTING + !id TYPE string + !page TYPE i OPTIONAL + !rpp TYPE i OPTIONAL + RETURNING + VALUE(return_data) TYPE response_listworkgroupusers + RAISING + cx_static_check . "! POST - "Associate workgroup user" "! Operation id: AssociateWorkgroupUser "! Parameter: id, required, path @@ -1397,12 +1397,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/AssociateWorkgroupUserRequest - methods ASSOCIATEWORKGROUPUSER - importing - !ID type STRING - !BODY type ASSOCIATEWORKGROUPUSERREQUEST - raising - CX_STATIC_CHECK . + METHODS associateworkgroupuser + IMPORTING + !id TYPE string + !body TYPE associateworkgroupuserrequest + RAISING + cx_static_check . "! GET - "Get workgroup details" "! Operation id: GetWorkgroupDetails "! Parameter: id, required, path @@ -1411,11 +1411,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods GETWORKGROUPDETAILS - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS getworkgroupdetails + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! PUT - "Update workgroup" "! Operation id: UpdateWorkgroup "! Parameter: id, required, path @@ -1425,12 +1425,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Workgroup - methods UPDATEWORKGROUP - importing - !ID type STRING - !BODY type WORKGROUP - raising - CX_STATIC_CHECK . + METHODS updateworkgroup + IMPORTING + !id TYPE string + !body TYPE workgroup + RAISING + cx_static_check . "! DELETE - "Delete workgroup" "! Operation id: DeleteWorkgroup "! Parameter: id, required, path @@ -1439,11 +1439,11 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods DELETEWORKGROUP - importing - !ID type STRING - raising - CX_STATIC_CHECK . + METHODS deleteworkgroup + IMPORTING + !id TYPE string + RAISING + cx_static_check . "! POST - "Create a business object" "! Operation id: CreateBaselineBusinessObject "! Response: 202 @@ -1454,15 +1454,15 @@ interface ZIF_PRVD_BASELINE "! application/json, #/components/schemas/Error "! Response: 503 "! Body ref: #/components/schemas/BusinessObject - methods CREATEBASELINEBUSINESSOBJECT - importing - !BODY type BUSINESSOBJECT - exporting - !STATUSCODE type I - !APIRESPONSESTR type STRING - !APIRESPONSE type ref to DATA - raising - CX_STATIC_CHECK . + METHODS createbaselinebusinessobject + IMPORTING + !body TYPE businessobject + EXPORTING + !statuscode TYPE i + !apiresponsestr TYPE string + !apiresponse TYPE REF TO data + RAISING + cx_static_check . "! PUT - "Update a business object" "! Operation id: UpdateBaselineBusinessObject "! Parameter: id, required, path @@ -1472,12 +1472,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/BusinessObject - methods UPDATEBASELINEBUSINESSOBJECT - importing - !ID type STRING - !BODY type BUSINESSOBJECT - raising - CX_STATIC_CHECK . + METHODS updatebaselinebusinessobject + IMPORTING + !id TYPE string + !body TYPE businessobject + RAISING + cx_static_check . "! GET - "List Circuits" "! Operation id: ListCircuits "! Parameter: curve, optional, query @@ -1491,15 +1491,15 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods LISTCIRCUITS - importing - !CURVE type STRING optional - !IDENTIFIER type STRING optional - !PROVIDER type STRING optional - !PROVING_SCHEME type STRING optional - !STATUS type STRING optional - raising - CX_STATIC_CHECK . + METHODS listcircuits + IMPORTING + !curve TYPE string OPTIONAL + !identifier TYPE string OPTIONAL + !provider TYPE string OPTIONAL + !proving_scheme TYPE string OPTIONAL + !status TYPE string OPTIONAL + RAISING + cx_static_check . "! POST - "Create circuit" "! Operation id: CreateCircuit "! Response: 200 @@ -1508,11 +1508,11 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/Circuit - methods CREATECIRCUIT - importing - !BODY type CIRCUIT - raising - CX_STATIC_CHECK . + METHODS createcircuit + IMPORTING + !body TYPE circuit + RAISING + cx_static_check . "! POST - "Prove circuit" "! Operation id: Prove "! Parameter: id, required, path @@ -1523,12 +1523,12 @@ interface ZIF_PRVD_BASELINE "! Response: 422 "! Response: 503 "! Body ref: #/components/schemas/ProveRequest - methods PROVE - importing - !ID type STRING - !BODY type PROVEREQUEST - raising - CX_STATIC_CHECK . + METHODS prove + IMPORTING + !id TYPE string + !body TYPE proverequest + RAISING + cx_static_check . "! POST - "Verify" "! Operation id: Verify "! Parameter: id, required, path @@ -1538,12 +1538,12 @@ interface ZIF_PRVD_BASELINE "! Response: 404 "! Response: 503 "! Body ref: #/components/schemas/VerifyProofRequest - methods VERIFY - importing - !ID type STRING - !BODY type VERIFYPROOFREQUEST - raising - CX_STATIC_CHECK . + METHODS verify + IMPORTING + !id TYPE string + !body TYPE verifyproofrequest + RAISING + cx_static_check . "! GET - "Retrieve store value" "! Operation id: GetStoreValue "! Parameter: id, required, path @@ -1553,54 +1553,54 @@ interface ZIF_PRVD_BASELINE "! Response: 403 "! Response: 404 "! Response: 503 - methods GETSTOREVALUE - importing - !ID type STRING - !INDEX type STRING - raising - CX_STATIC_CHECK . + METHODS getstorevalue + IMPORTING + !id TYPE string + !index TYPE string + RAISING + cx_static_check . "! GET - "JSON Web Key Set (JWK)" "! Operation id: ListWellKnownKeys "! Response: 200 "! application/json; charset=UTF-8, array "! Response: default "! application/json, #/components/schemas/Error - methods LISTWELLKNOWNKEYS - raising - CX_STATIC_CHECK . + METHODS listwellknownkeys + RAISING + cx_static_check . "! GET - "Returns OpenID configuration" "! Operation id: ListOpenIDConfiguration "! Response: 200 "! application/json; charset=UTF-8, #/components/schemas/OpenIDConfig "! Response: default "! application/json, #/components/schemas/Error - methods LISTOPENIDCONFIGURATION - raising - CX_STATIC_CHECK . + METHODS listopenidconfiguration + RAISING + cx_static_check . "! POST "! "!https://gist.github.com/kthomas/459381e98c808febea9c1bb51408bbde - methods SEND_PROTOCOL_MSG - importing - !IV_BODY type PROTOCOLMESSAGE_REQ - !IV_BPITOKEN type ZPRVDREFRESHTOKEN - exporting - !EV_STATUSCODE type I - !EV_APIRESPONSESTR type STRING - !EV_APIRESPONSE type ref to DATA - raising - CX_STATIC_CHECK . - methods STATUS - exporting - !STATUSCODE type I - raising - CX_STATIC_CHECK . - methods SEND_BPIOBJECTS_MSG - importing - !BODY type BPIOBJECTS_REQ - exporting - !STATUSCODE type I - !APIRESPONSESTR type STRING - !APIRESPONSE type ref to DATA - raising - CX_STATIC_CHECK . -endinterface. + METHODS send_protocol_msg + IMPORTING + !iv_body TYPE protocolmessage_req + !iv_bpitoken TYPE zprvdrefreshtoken + EXPORTING + !ev_statuscode TYPE i + !ev_apiresponsestr TYPE string + !ev_apiresponse TYPE REF TO data + RAISING + cx_static_check . + METHODS status + EXPORTING + !statuscode TYPE i + RAISING + cx_static_check . + METHODS send_bpiobjects_msg + IMPORTING + !body TYPE bpiobjects_req + EXPORTING + !statuscode TYPE i + !apiresponsestr TYPE string + !apiresponse TYPE REF TO data + RAISING + cx_static_check . +ENDINTERFACE. diff --git a/src/zif_prvd_file.intf.abap b/src/zif_prvd_file.intf.abap index 2b4bcf5..e9b30bb 100644 --- a/src/zif_prvd_file.intf.abap +++ b/src/zif_prvd_file.intf.abap @@ -1,11 +1,11 @@ -interface ZIF_PRVD_FILE - public . +INTERFACE zif_prvd_file + PUBLIC . - types: + TYPES: BEGIN OF ty_filecontent, rec TYPE xstring, END OF ty_filecontent . - types: + TYPES: tty_filecontent TYPE TABLE OF ty_filecontent . -endinterface. +ENDINTERFACE. diff --git a/src/zif_prvd_nchain.intf.abap b/src/zif_prvd_nchain.intf.abap index 4ee9ee8..981ee75 100644 --- a/src/zif_prvd_nchain.intf.abap +++ b/src/zif_prvd_nchain.intf.abap @@ -473,21 +473,21 @@ INTERFACE zif_prvd_nchain END OF ty_account. TYPES: ty_account_list TYPE STANDARD TABLE OF ty_account. - types: BEGIN OF ty_basic_txn_details, - id type zcasesensitive_str, - ref type zcasesensitive_str, - network_id type zprvd_nchain_networkid, - hash type zcasesensitive_str, + TYPES: BEGIN OF ty_basic_txn_details, + id TYPE zcasesensitive_str, + ref TYPE zcasesensitive_str, + network_id TYPE zprvd_nchain_networkid, + hash TYPE zcasesensitive_str, END OF ty_basic_txn_details. - types: begin of ty_deployed_contract, - id type zcasesensitive_str, - name type zcasesensitive_str, - network_id type zprvd_nchain_networkid, - address type zprvd_smartcontract_addr, - end of ty_deployed_contract. + TYPES: BEGIN OF ty_deployed_contract, + id TYPE zcasesensitive_str, + name TYPE zcasesensitive_str, + network_id TYPE zprvd_nchain_networkid, + address TYPE zprvd_smartcontract_addr, + END OF ty_deployed_contract. - types: ty_contract_list type standard table of ty_deployed_contract. + TYPES: ty_contract_list TYPE STANDARD TABLE OF ty_deployed_contract. "! GET - "List connectors" @@ -720,7 +720,7 @@ INTERFACE zif_prvd_nchain "! Response: 200 "! Body ref: #/components/schemas/Create%26broadcasttransaction-AccountRequest METHODS create_broadcast_txn_ac - IMPORTING is_nchain_txn TYPE zif_prvd_nchain=>ty_create_broadcast_txn_ac + IMPORTING !is_nchain_txn TYPE ty_create_broadcast_txn_ac EXPORTING !ev_apiresponsestr TYPE string !ev_apiresponse TYPE REF TO data @@ -824,6 +824,7 @@ INTERFACE zif_prvd_nchain !ev_httpresponsecode TYPE i RAISING cx_static_check . + "! Creates a middleware instance for the contract in the PRVD stack METHODS createpricefeedcontract IMPORTING !iv_smartcontractaddr TYPE zprvd_smartcontract_addr @@ -834,6 +835,7 @@ INTERFACE zif_prvd_nchain !ev_httpresponsecode TYPE i RAISING cx_static_check . + "! Creates a middleware instance for the contract in the PRVD stack METHODS create_contract IMPORTING !iv_smartcontractaddr TYPE zprvd_smartcontract_addr @@ -844,6 +846,7 @@ INTERFACE zif_prvd_nchain !ev_httpresponsecode TYPE i RAISING cx_static_check . + "! Approves the smart contract for users METHODS approve_smart_contract IMPORTING !is_contract_approval TYPE ty_contract_approval diff --git a/src/zif_prvd_nchain_abi_upload.intf.abap b/src/zif_prvd_nchain_abi_upload.intf.abap deleted file mode 100644 index bfe69ee..0000000 --- a/src/zif_prvd_nchain_abi_upload.intf.abap +++ /dev/null @@ -1,47 +0,0 @@ -interface ZIF_PRVD_NCHAIN_ABI_UPLOAD - public . - - - types: - BEGIN OF ty_abi_registry, - nchain_networkid TYPE zprvd_smartcontract_addr, - smartcontract_address TYPE zprvd_smartcontract_addr, - valid_from TYPE timestampl, - valid_to TYPE timestampl, - abi_location TYPE zcasesensitive_str, - created_by TYPE uname, - created_on TYPE timestampl, - changed_by TYPE uname, - changed_on TYPE timestampl, - production_mainnet TYPE char1, - END OF ty_abi_registry . - types: - tty_abi_registry TYPE STANDARD TABLE OF ty_abi_registry . - - "! Uploads an ABI file into a AL11 directory - methods UPLOAD_ABI_FILE . - "! Creates a table entry to ZPRVDABIREGISTRY, indexing the smart contract/network id to the file - methods REGISTER_ABI_FILE - exporting - !EV_SUCCESS type ABAP_BOOL . - "! Clears the ABI file directory assignment to ZPRVDABIREGISTRY - methods UNREGISTER_ABI_FILE - exporting - !EV_SUCCESS type ABAP_BOOL . - "! Deletes the specific ABI file from AL11 - methods DELETE_FILE - exporting - !EV_SUCCESS type ABAP_BOOL . - "! Deletes an entry from ZPRVDABIREGISTRY. Note that AL11 file deletion is handled elsewhere - methods DELETE_REGISTRY - exporting - !EV_SUCCESS type ABAP_BOOL . - "! Sets a valid to date for the ABI registry table entry (enables timelocked go-live) - methods UPDATE_VALIDTO . - "! Sets a valid from date for the ABI registry table entry (enables timelocked go-live) - methods UPDATE_VALIDFROM . - "! Validates an incoming or current entry to the ZPRVDABIREGISTRY table - methods VALIDATE_REGISTRY . - "! Selects a default ALL path to which ABI files will be stored - methods SET_AL11_ABI_FILE_PATH . -endinterface. diff --git a/src/zif_prvd_nchain_abi_upload.intf.xml b/src/zif_prvd_nchain_abi_upload.intf.xml deleted file mode 100644 index 2510993..0000000 --- a/src/zif_prvd_nchain_abi_upload.intf.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - ZIF_PRVD_NCHAIN_ABI_UPLOAD - E - PRVD NChain ABI upload global interface - 2 - 1 - X - - - - diff --git a/src/zif_prvd_nchain_network.intf.abap b/src/zif_prvd_nchain_network.intf.abap index 5467dc1..89d155f 100644 --- a/src/zif_prvd_nchain_network.intf.abap +++ b/src/zif_prvd_nchain_network.intf.abap @@ -9,15 +9,20 @@ INTERFACE zif_prvd_nchain_network TYPES: ty_prvd_nchain_network_list TYPE TABLE OF ty_prvd_nchain_network WITH KEY network_id. - CLASS-METHODS create IMPORTING is_prvd_nchain_network TYPE ty_prvd_nchain_network. - CLASS-METHODS read IMPORTING iv_network_id TYPE zprvd_nchain_networkid - RETURNING VALUE(rs_prvd_nchain_network) TYPE ty_prvd_nchain_network. - CLASS-METHODS update IMPORTING is_prvd_nchain_network TYPE ty_prvd_nchain_network. - CLASS-METHODS delete IMPORTING iv_network_id TYPE zprvd_nchain_networkid - RETURNING VALUE(rs_prvd_nchain_network) TYPE ty_prvd_nchain_network. - CLASS-METHODS query IMPORTING iv_network_id TYPE zprvd_nchain_networkid - iv_network_type TYPE zprvd_nchain_network_type - iv_description TYPE char100 - RETURNING VALUE(rt_prvd_nchain_network) TYPE ty_prvd_nchain_network_list. + "! Create a PRVD Network reference + CLASS-METHODS create IMPORTING !is_prvd_nchain_network TYPE ty_prvd_nchain_network. + "! Read a PRVD Network reference + CLASS-METHODS read IMPORTING !iv_network_id TYPE zprvd_nchain_networkid + RETURNING VALUE(!rs_prvd_nchain_network) TYPE ty_prvd_nchain_network. + "! Update a PRVD network reference + CLASS-METHODS update IMPORTING !is_prvd_nchain_network TYPE ty_prvd_nchain_network. + "! Delete a PRVD network reference + CLASS-METHODS delete IMPORTING !iv_network_id TYPE zprvd_nchain_networkid + RETURNING VALUE(!rs_prvd_nchain_network) TYPE ty_prvd_nchain_network. + "! Query a PRVD network reference + CLASS-METHODS query IMPORTING !iv_network_id TYPE zprvd_nchain_networkid + !iv_network_type TYPE zprvd_nchain_network_type + !iv_description TYPE char100 + RETURNING VALUE(!rt_prvd_nchain_network) TYPE ty_prvd_nchain_network_list. ENDINTERFACE. diff --git a/src/zif_prvd_object.intf.abap b/src/zif_prvd_object.intf.abap index cb31dc1..d4d6a6c 100644 --- a/src/zif_prvd_object.intf.abap +++ b/src/zif_prvd_object.intf.abap @@ -1,32 +1,32 @@ -interface ZIF_PRVD_OBJECT - public . +INTERFACE zif_prvd_object + PUBLIC . - types: + TYPES: BEGIN OF ty_update_status_req, status TYPE string, baseline_id TYPE zbpiobj-baseline_id, END OF ty_update_status_req . - types: + TYPES: BEGIN OF ty_update_status_res, status TYPE string, baseline_id TYPE zbpiobj-baseline_id, object_id TYPE zbpiobj-object_id, END OF ty_update_status_res . - types: + TYPES: BEGIN OF ty_update_object_req, payload TYPE REF TO data, type TYPE string, baseline_id TYPE zbpiobj-baseline_id, END OF ty_update_object_req . - types: + TYPES: BEGIN OF ty_create_object_req, payload TYPE REF TO data, type TYPE string, schema_type TYPE string, baseline_id TYPE zbpiobj-baseline_id, END OF ty_create_object_req . - types: + TYPES: BEGIN OF ty_create_object_req_objid, payload TYPE REF TO data, type TYPE string, @@ -34,6 +34,6 @@ interface ZIF_PRVD_OBJECT baseline_id TYPE zbpiobj-baseline_id, object_id TYPE zbpiobj-object_id, END OF ty_create_object_req_objid . - types: + TYPES: tty_create_object_req_objid TYPE TABLE OF ty_create_object_req_objid . -endinterface. +ENDINTERFACE. diff --git a/src/zif_prvd_privacy.intf.abap b/src/zif_prvd_privacy.intf.abap index 9da1b70..832a4a6 100644 --- a/src/zif_prvd_privacy.intf.abap +++ b/src/zif_prvd_privacy.intf.abap @@ -1,8 +1,8 @@ -interface ZIF_PRVD_PRIVACY - public . +INTERFACE zif_prvd_privacy + PUBLIC . - types: + TYPES: "! Component schema: CreatecircuitRequest, object BEGIN OF ty_createcircuitrequest, iv_identifier TYPE string, @@ -11,7 +11,7 @@ interface ZIF_PRVD_PRIVACY iv_provider TYPE string, iv_name TYPE string, END OF ty_createcircuitrequest . - types: + TYPES: "! Component schema: ProveRequest, object BEGIN OF ty_proverequest, iv_identifier TYPE string, @@ -20,13 +20,13 @@ interface ZIF_PRVD_PRIVACY iv_provider TYPE string, iv_name TYPE string, END OF ty_proverequest . - types: + TYPES: "! Component schema: Witness, object BEGIN OF ty_witness, iv_x TYPE string, iv_y TYPE string, END OF ty_witness . - types: + TYPES: "! Component schema: VerifyRequest, object BEGIN OF ty_verifyrequest, is_witness TYPE ty_witness, @@ -36,27 +36,27 @@ interface ZIF_PRVD_PRIVACY "! GET - "List circuits" "! Operation id: Listcircuits "! Response: 200 - methods LISTCIRCUITS - raising - CX_STATIC_CHECK . + METHODS listcircuits + RAISING + cx_static_check . "! POST - "Create circuit" "! Operation id: Createcircuit "! Response: 200 "! Body ref: #/components/schemas/CreatecircuitRequest - methods CREATECIRCUIT - importing - !IS_BODY type TY_CREATECIRCUITREQUEST - raising - CX_STATIC_CHECK . + METHODS createcircuit + IMPORTING + !is_body TYPE ty_createcircuitrequest + RAISING + cx_static_check . "! POST - "Verify" "! Operation id: Verify "! Parameter: circuit_id, required, path "! Response: 200 "! Body ref: #/components/schemas/VerifyRequest - methods VERIFY - importing - !IV_CIRCUIT_ID type STRING - !IS_BODY type TY_VERIFYREQUEST - raising - CX_STATIC_CHECK . -endinterface. + METHODS verify + IMPORTING + !iv_circuit_id TYPE string + !is_body TYPE ty_verifyrequest + RAISING + cx_static_check . +ENDINTERFACE. diff --git a/src/zif_prvd_tenants.intf.abap b/src/zif_prvd_tenants.intf.abap index e487de4..1401f93 100644 --- a/src/zif_prvd_tenants.intf.abap +++ b/src/zif_prvd_tenants.intf.abap @@ -1,8 +1,8 @@ -interface ZIF_PRVD_TENANTS - public . +INTERFACE zif_prvd_tenants + PUBLIC . - types: + TYPES: BEGIN OF ty_tenant_wo_token, mandt TYPE mandt, organization_id TYPE zprvdtenants-organization_id, @@ -16,13 +16,13 @@ interface ZIF_PRVD_TENANTS changed_at TYPE zprvdtenants-changed_at, reachable TYPE boolean, END OF ty_tenant_wo_token . - types: + TYPES tty_tenant_wo_token TYPE TABLE OF ty_tenant_wo_token . - types: + TYPES: BEGIN OF ty_org_refresh_token_req, mandt TYPE mandt, organization_id TYPE zprvdtenants-organization_id, - refresh_token type zprvdrefreshtoken, - end of ty_org_refresh_token_req. -endinterface. + refresh_token TYPE zprvdrefreshtoken, + END OF ty_org_refresh_token_req. +ENDINTERFACE. diff --git a/src/zif_prvd_unittests.intf.abap b/src/zif_prvd_unittests.intf.abap deleted file mode 100644 index d0e2682..0000000 --- a/src/zif_prvd_unittests.intf.abap +++ /dev/null @@ -1,27 +0,0 @@ -interface ZIF_PRVD_UNITTESTS - public . - - - "! Ident reachability - methods IS_IDENT_REACHABLE - returning - value(RV_RESULT) type ABAP_BOOL . - "! Ident authentication - methods IS_IDENT_AUTH_OK - returning - value(RV_RESULT) type ABAP_BOOL . - "! BPI reachability - methods IS_BPI_REACHABLE - returning - value(RV_RESULT) type ABAP_BOOL . - "! Sending a protocol message - methods IS_PROTOCOL_MESSAGE_OK - returning - value(RV_RESULT) type ABAP_BOOL . - "! general http expected check - methods IS_EXPECTED_HTTP_STATUS - importing - !I_EXPECTED_STAT type I - returning - value(RV_RESULT) type ABAP_BOOL . -endinterface. diff --git a/src/zif_prvd_unittests.intf.xml b/src/zif_prvd_unittests.intf.xml deleted file mode 100644 index eefb80c..0000000 --- a/src/zif_prvd_unittests.intf.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - ZIF_PRVD_UNITTESTS - E - Interface for PRVD ABAP Unit Tests - 2 - 1 - X - - - - diff --git a/src/zif_prvd_vault.intf.abap b/src/zif_prvd_vault.intf.abap index 6a97bf0..ae960e3 100644 --- a/src/zif_prvd_vault.intf.abap +++ b/src/zif_prvd_vault.intf.abap @@ -6,18 +6,18 @@ INTERFACE zif_prvd_vault c_vaultkey_asym TYPE string VALUE 'assymetric'. "vault key specs - symmetric - CONSTANTS: c_vaultkey_spec_aes256 TYPE string VALUE 'AES-256-GCM'. - CONSTANTS: c_vaultkey_spec_chacha20 TYPE string VALUE 'ChaCha20'. + CONSTANTS c_vaultkey_spec_aes256 TYPE string VALUE 'AES-256-GCM'. + CONSTANTS c_vaultkey_spec_chacha20 TYPE string VALUE 'ChaCha20'. "RSA - CONSTANTS: c_vaultkey_spec_rsa TYPE string VALUE 'RSA'. + CONSTANTS c_vaultkey_spec_rsa TYPE string VALUE 'RSA'. "vault key specs - assymetric - CONSTANTS: c_vaultkey_spec_bjj TYPE string VALUE 'babyJubJub'. - CONSTANTS: c_vaultkey_spec_c25519 TYPE string VALUE 'C25519'. - CONSTANTS: c_vaultkey_spec_ed25519 TYPE string VALUE 'Ed25519'. - CONSTANTS: c_vaultkey_spec_nats_ed25519 TYPE string VALUE 'Ed25519-nkey'. - CONSTANTS: c_vaultkey_spec_secp256k1 TYPE string VALUE 'secp256k1'. - CONSTANTS: c_vaultkey_spec_bip39 TYPE string VALUE 'BIP39'. + CONSTANTS c_vaultkey_spec_bjj TYPE string VALUE 'babyJubJub'. + CONSTANTS c_vaultkey_spec_c25519 TYPE string VALUE 'C25519'. + CONSTANTS c_vaultkey_spec_ed25519 TYPE string VALUE 'Ed25519'. + CONSTANTS c_vaultkey_spec_nats_ed25519 TYPE string VALUE 'Ed25519-nkey'. + CONSTANTS c_vaultkey_spec_secp256k1 TYPE string VALUE 'secp256k1'. + CONSTANTS c_vaultkey_spec_bip39 TYPE string VALUE 'BIP39'. TYPES: BEGIN OF ty_vault_query, @@ -27,7 +27,7 @@ INTERFACE zif_prvd_vault description TYPE string, END OF ty_vault_query. - TYPES: tty_vault_query TYPE TABLE OF ty_vault_query WITH KEY id. + TYPES tty_vault_query TYPE TABLE OF ty_vault_query WITH KEY id. TYPES: BEGIN OF ty_vault_create, name TYPE string, @@ -48,7 +48,7 @@ INTERFACE zif_prvd_vault fingerprint TYPE string, END OF ty_vault_keys. - TYPES: ty_vault_keys_list TYPE TABLE OF ty_vault_keys WITH KEY id. + TYPES ty_vault_keys_list TYPE TABLE OF ty_vault_keys WITH KEY id. TYPES: BEGIN OF ty_signed_message, message TYPE string, @@ -262,7 +262,7 @@ INTERFACE zif_prvd_vault METHODS sign IMPORTING iv_vaultid TYPE zprvdvaultid - iv_keyid type zprvdvaultid + iv_keyid TYPE zprvdvaultid is_message TYPE ty_signed_message iv_content_type TYPE string EXPORTING