View | Details | Raw Unified | Return to bug 26355
Collapse All | Expand All

(-)a/api/v1/swagger/definitions/patron.yaml (+4 lines)
Lines 408-413 properties: Link Here
408
      - "null"
408
      - "null"
409
    description: patron's primary contact method
409
    description: patron's primary contact method
410
    maxLength: 45
410
    maxLength: 45
411
  self_renewal_available:
412
    type:
413
      - boolean
414
    description: set to 1 if the patron is eligible to self renew and is within the renewal criteria
411
  _strings:
415
  _strings:
412
    type:
416
    type:
413
      - object
417
      - object
(-)a/api/v1/swagger/definitions/patron_category.yaml (-5 / +29 lines)
Lines 46-56 properties: Link Here
46
      - boolean
46
      - boolean
47
      - "null"
47
      - "null"
48
    description: Are overdue notices sent to this patron category (1 for yes, 0 for no)
48
    description: Are overdue notices sent to this patron category (1 for yes, 0 for no)
49
  reserve_fee:
50
    type:
51
      - number
52
      - "null"
53
    description: Cost to place holds
54
  hide_lost_items:
49
  hide_lost_items:
55
    type: boolean
50
    type: boolean
56
    description: Are lost items shown to this category (1 for yes, 0 for no)
51
    description: Are lost items shown to this category (1 for yes, 0 for no)
Lines 129-134 properties: Link Here
129
    type:
124
    type:
130
      - boolean
125
      - boolean
131
    description: Set threshold of debt allowed before issues are blocked
126
    description: Set threshold of debt allowed before issues are blocked
127
  self_renewal_enabled:
128
    type:
129
      - boolean
130
    description: Determine whether self-renewal is allowed for this category
131
  self_renewal_availability_start:
132
    type:
133
      - number
134
      - "null"
135
    description: How many days in advance of expiry self-renewal should become available
136
  self_renewal_if_expired:
137
    type:
138
      - number
139
      - "null"
140
    description: How many days after expiry self-renewal should still be available
141
  self_renewal_fines_block:
142
    type:
143
      - number
144
      - "null"
145
    description: How much can be accrued in fines before self-renewal is blocked
146
  self_renewal_failure_message:
147
    type:
148
      - string
149
      - "null"
150
    description: The error message to display if self-renewal fails
151
  self_renewal_information_message:
152
    type:
153
      - string
154
      - "null"
155
    description: The information to display to the user before starting the renewal process
132
additionalProperties: false
156
additionalProperties: false
133
required:
157
required:
134
  - patron_category_id
158
  - patron_category_id
(-)a/api/v1/swagger/definitions/patron_self_renewal.yaml (+23 lines)
Line 0 Link Here
1
---
2
type: "object"
3
properties:
4
  self_renewal_settings:
5
    type:
6
      - object
7
      - "null"
8
    description: The object representing the self-renewal settings for the patron's category
9
  expiry_date:
10
    type:
11
      - string
12
      - "null"
13
    description: The new expiry date on successful self-renewal
14
  confirmation_sent:
15
    type:
16
      - array
17
      - "null"
18
    description: The method(s) through which confirmation of renewal has been sent
19
  patron:
20
    type:
21
      - object
22
    description: The object representing the patron fields from the OPAC form
23
additionalProperties: false
(-)a/api/v1/swagger/paths/patron_categories.yaml (+46 lines)
Lines 52-54 Link Here
52
    x-koha-authorization:
52
    x-koha-authorization:
53
      permissions:
53
      permissions:
54
        parameters: manage_patron_categories
54
        parameters: manage_patron_categories
55
  post:
56
    x-mojo-to: Patrons::Categories#add
57
    operationId: addCategory
58
    tags:
59
      - categories
60
    summary: Add category
61
    parameters:
62
      - name: body
63
        in: body
64
        description: A JSON object containing information about the category
65
        required: true
66
        schema:
67
          $ref: "../swagger.yaml#/definitions/patron_category"
68
    produces:
69
      - application/json
70
    responses:
71
      "201":
72
        description: Category added
73
        schema:
74
          $ref: "../swagger.yaml#/definitions/patron_category"
75
      "400":
76
        description: Bad request
77
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
79
      "401":
80
        description: Authentication required
81
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
83
      "403":
84
        description: Access forbidden
85
        schema:
86
          $ref: "../swagger.yaml#/definitions/error"
87
      "500":
88
        description: |
89
          Internal server error. Possible `error_code` attribute values:
90
91
          * `internal_server_error`
92
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
94
      "503":
95
        description: Under maintenance
96
        schema:
97
          $ref: "../swagger.yaml#/definitions/error"
98
    x-koha-authorization:
99
      permissions:
100
        parameters: manage_patron_categories
(-)a/api/v1/swagger/paths/public_patrons.yaml (+109 lines)
Lines 344-346 Link Here
344
        description: Under maintenance
344
        description: Under maintenance
345
        schema:
345
        schema:
346
          $ref: "../swagger.yaml#/definitions/error"
346
          $ref: "../swagger.yaml#/definitions/error"
347
/public/patrons/{patron_id}/self_renewal:
348
  get:
349
    x-mojo-to: Patrons::SelfRenewal#start
350
    operationId: startSelfRenewal
351
    tags:
352
      - patrons
353
    summary: List patrons
354
    produces:
355
      - application/json
356
    parameters:
357
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
358
      - $ref: "../swagger.yaml#/parameters/match"
359
      - $ref: "../swagger.yaml#/parameters/order_by"
360
      - $ref: "../swagger.yaml#/parameters/page"
361
      - $ref: "../swagger.yaml#/parameters/per_page"
362
      - $ref: "../swagger.yaml#/parameters/q_param"
363
      - $ref: "../swagger.yaml#/parameters/q_body"
364
      - $ref: "../swagger.yaml#/parameters/request_id_header"
365
    responses:
366
      "200":
367
        description: The metadata required to start patron self-renewal
368
        schema:
369
          type: object
370
          $ref: "../swagger.yaml#/definitions/patron_self_renewal"
371
          additionalProperties: false
372
      "400":
373
        description: |
374
          Bad request. Possible `error_code` attribute values:
375
376
            * `invalid_query`
377
        schema:
378
          $ref: "../swagger.yaml#/definitions/error"
379
      "401":
380
        description: Authentication required
381
        schema:
382
          $ref: "../swagger.yaml#/definitions/error"
383
      "403":
384
        description: Access forbidden
385
        schema:
386
          $ref: "../swagger.yaml#/definitions/error"
387
      "500":
388
        description: |
389
          Internal server error. Possible `error_code` attribute values:
390
391
          * `internal_server_error`
392
        schema:
393
          $ref: "../swagger.yaml#/definitions/error"
394
      "503":
395
        description: Under maintenance
396
        schema:
397
          $ref: "../swagger.yaml#/definitions/error"
398
  post:
399
    x-mojo-to: Patrons::SelfRenewal#submit
400
    operationId: submitSelfRenewal
401
    tags:
402
      - patrons
403
    summary: Submit self-renewal form
404
    consumes:
405
      - application/json
406
    produces:
407
      - application/json
408
    parameters:
409
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
410
      - description: A JSON object containing information about the self-renewal
411
        in: body
412
        name: body
413
        required: true
414
        schema:
415
            $ref: "../swagger.yaml#/definitions/patron_self_renewal"
416
    responses:
417
      201:
418
        description: A successfully completed renewal
419
        schema:
420
          items:
421
            $ref: "../swagger.yaml#/definitions/patron_self_renewal"
422
      400:
423
        description: Bad request
424
        schema:
425
          $ref: "../swagger.yaml#/definitions/error"
426
      401:
427
        description: Authentication required
428
        schema:
429
          $ref: "../swagger.yaml#/definitions/error"
430
      403:
431
        description: Access forbidden
432
        schema:
433
          $ref: "../swagger.yaml#/definitions/error"
434
      404:
435
        description: Ressource not found
436
        schema:
437
          $ref: "../swagger.yaml#/definitions/error"
438
      409:
439
        description: Conflict in creating resource
440
        schema:
441
          $ref: "../swagger.yaml#/definitions/error"
442
      413:
443
        description: Payload too large
444
        schema:
445
          $ref: "../swagger.yaml#/definitions/error"
446
      500:
447
        description: |-
448
          Internal server error. Possible `error_code` attribute values:
449
          * `internal_server_error`
450
        schema:
451
          $ref: "../swagger.yaml#/definitions/error"
452
      503:
453
        description: Under maintenance
454
        schema:
455
          $ref: "../swagger.yaml#/definitions/error"
(-)a/api/v1/swagger/swagger.yaml (-1 / +7 lines)
Lines 154-159 definitions: Link Here
154
    $ref: ./definitions/patron_balance.yaml
154
    $ref: ./definitions/patron_balance.yaml
155
  patron_category:
155
  patron_category:
156
    $ref: ./definitions/patron_category.yaml
156
    $ref: ./definitions/patron_category.yaml
157
  patron_self_renewal:
158
    $ref: ./definitions/patron_self_renewal.yaml
157
  patron_extended_attribute:
159
  patron_extended_attribute:
158
    $ref: ./definitions/patron_extended_attribute.yaml
160
    $ref: ./definitions/patron_extended_attribute.yaml
159
  preservation_config:
161
  preservation_config:
Lines 581-586 paths: Link Here
581
    $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1ill~1requests"
583
    $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1ill~1requests"
582
  "/public/patrons/{patron_id}/password":
584
  "/public/patrons/{patron_id}/password":
583
    $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
585
    $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
586
  "/public/patrons/{patron_id}/self_renewal":
587
    $ref: "./paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1self_renewal"
584
  "/public/tickets":
588
  "/public/tickets":
585
    $ref: "./paths/tickets.yaml#/~1public~1tickets"
589
    $ref: "./paths/tickets.yaml#/~1public~1tickets"
586
  /quotes:
590
  /quotes:
Lines 1230-1235 tags: Link Here
1230
  - description: "Manage cash register cashups\n"
1234
  - description: "Manage cash register cashups\n"
1231
    name: cashups
1235
    name: cashups
1232
    x-displayName: Cashups
1236
    x-displayName: Cashups
1237
  - description: "Manage categories\n"
1238
    name: categories
1239
    x-displayName: Categories
1233
  - description: "Manage checkouts\n"
1240
  - description: "Manage checkouts\n"
1234
    name: checkouts
1241
    name: checkouts
1235
    x-displayName: Checkouts
1242
    x-displayName: Checkouts
1236
- 

Return to bug 26355