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 / +25 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: string
148
    description: The error message to display if self-renewal fails
149
  self_renewal_information_message:
150
    type: string
151
    description: The information to display to the user before starting the renewal process
132
additionalProperties: false
152
additionalProperties: false
133
required:
153
required:
134
  - patron_category_id
154
  - 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 informations 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 (+108 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
      "400":
372
        description: |
373
          Bad request. Possible `error_code` attribute values:
374
375
            * `invalid_query`
376
        schema:
377
          $ref: "../swagger.yaml#/definitions/error"
378
      "401":
379
        description: Authentication required
380
        schema:
381
          $ref: "../swagger.yaml#/definitions/error"
382
      "403":
383
        description: Access forbidden
384
        schema:
385
          $ref: "../swagger.yaml#/definitions/error"
386
      "500":
387
        description: |
388
          Internal server error. Possible `error_code` attribute values:
389
390
          * `internal_server_error`
391
        schema:
392
          $ref: "../swagger.yaml#/definitions/error"
393
      "503":
394
        description: Under maintenance
395
        schema:
396
          $ref: "../swagger.yaml#/definitions/error"
397
  post:
398
    x-mojo-to: Patrons::SelfRenewal#submit
399
    operationId: submitSelfRenewal
400
    tags:
401
      - patrons
402
    summary: Submit self-renewal form
403
    consumes:
404
      - application/json
405
    produces:
406
      - application/json
407
    parameters:
408
      - $ref: "../swagger.yaml#/parameters/patron_id_pp"
409
      - description: A JSON object containing information about the self-renewal
410
        in: body
411
        name: body
412
        required: true
413
        schema:
414
            $ref: "../swagger.yaml#/definitions/patron_self_renewal"
415
    responses:
416
      201:
417
        description: A successfully completed renewal
418
        schema:
419
          items:
420
            $ref: "../swagger.yaml#/definitions/patron_self_renewal"
421
      400:
422
        description: Bad request
423
        schema:
424
          $ref: "../swagger.yaml#/definitions/error"
425
      401:
426
        description: Authentication required
427
        schema:
428
          $ref: "../swagger.yaml#/definitions/error"
429
      403:
430
        description: Access forbidden
431
        schema:
432
          $ref: "../swagger.yaml#/definitions/error"
433
      404:
434
        description: Ressource not found
435
        schema:
436
          $ref: "../swagger.yaml#/definitions/error"
437
      409:
438
        description: Conflict in creating resource
439
        schema:
440
          $ref: "../swagger.yaml#/definitions/error"
441
      413:
442
        description: Payload too large
443
        schema:
444
          $ref: "../swagger.yaml#/definitions/error"
445
      500:
446
        description: |-
447
          Internal server error. Possible `error_code` attribute values:
448
          * `internal_server_error`
449
        schema:
450
          $ref: "../swagger.yaml#/definitions/error"
451
      503:
452
        description: Under maintenance
453
        schema:
454
          $ref: "../swagger.yaml#/definitions/error"
(-)a/api/v1/swagger/swagger.yaml (-1 / +4 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:
587
- 

Return to bug 26355